过滤JSON成果转化为图像路径 [英] filter json results into image path

查看:273
本文介绍了过滤JSON成果转化为图像路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我使用MIT应用发明2使该在一个旧(备用)上运行的应用程序的Andr​​oid手机,以显示当前正在播放的电影folder.jpg(后来我也想这样做与音乐)。

我无法过滤使用的路径,例如这是JSON的结果是:

<$p$p><$c$c>{\"id\":\"VideoGetItem\",\"jsonrpc\":\"2.0\",\"result\":{\"item\":{\"id\":1,\"label\":\"2012\",\"thumbnail\":\"image://F%3a%5cMovies%5c2012%5cfolder.jpg/\",\"type\":\"movie\"}}}

我想保持:图片://F%3a%5cMovies%5c2012%5cfolder.jpg 这是DVD封面(也许标签: 2012 这是电影的标题)。

我试过各种选项,如列了清单,但后来我仍然得到很多与之间则params的文本()结果
有人可以帮助我?结果
谢谢


解决方案

在成对的查询阻止使用 JSON德code 块在一起。正如你所看到的,它有助于用做...

在这里输入的形象描述

Hello i am using MIT App Inventor 2 to make an app that runs on an old (spare) android phone to display the folder.jpg of currently playing movie (later on I also want to do that with music).

I can't filter the path to use, for example this is the result of the json:

{"id":"VideoGetItem","jsonrpc":"2.0","result":{"item":{"id":1,"label":"2012","thumbnail":"image://F%3a%5cMovies%5c2012%5cfolder.jpg/","type":"movie"}}}

I want to keep: image://F%3a%5cMovies%5c2012%5cfolder.jpg which is the dvd cover (and maybe the label: 2012 which is the title of the movie).

I tried various options like making a list but then I still get text with lot of params between '()'
Can someone help me with this?
Thanks

解决方案

Use the JSON decode block together with the lookup in pairs block. As you can see, it helps to use Do it...

这篇关于过滤JSON成果转化为图像路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆