过滤JSON成果转化为图像路径转化为、路径、图像、成果

2023-09-07 00:00:25 作者:干掉妃子你就是皇后

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

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

{\"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 块在一起。正如你所看到的,它有助于用做...

PS里工作路径怎么转为形状路径

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...