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 cant filter te path to use, par example: {"id":"VideoGetItem","jsonrpc":"2.0","result":{"item":{"id":1,"label":"2012","thumbnail":"image://F%3a%5cMovies%5c2012%5cfolder.jpg/","type":"movie"}}}
this is the result of the json.
i want to keep: image://F%3a%5cMovies%5c2012%5cfolder.jpg // wich is the dvd cover (and maybe the label: label":"2012 )// wich is the titel of the movie
I tried various optiions like making a list but then i stil get text with lot of params between '()'
can someone help me with this ?
Thanks
Taifun's answer below is better :)
The Web component contains a JsonTextDecode block that converts the JSON text to a nested list.
Once you split that list down to the item's data fields you can use the list lookup in pairs block to get the value of a key.
What would the result be if you attached 'type' to the key socket of a lookup in pairs block in the above example?
---
sf
In the GotText event block you use an if block where the blocks will be different depending on the data returned.
Set GetThumbnail to false to get the time data instead.
---
sf