Kodular - Update Spinner From Json Text

Good Day All. IM having some problems.
I need to update A Spinner From a JSON Web Request.
See Below my Blocks. However its not updating correctly

Here is the sample of the json return code:

[{“project_id”:4,“project”:“Office HO”},{“project_id”:5,“project”:“Hired Plant”},{“project_id”:12,“project”:“Airport”},{“project_id”:13,“project”:“Test fdp”},{“project_id”:14,“project”:“N3 Detour”}]

What i would like ti the spiiner to have the value of the project field in the spinner.
All samples i see use JSON component which has been removed.
Any Help would be aweseome.
IM probably doing something stupid here

image

Try something like this. In my example I didn’t use any variables and I used JsonToDictionary extension by @Mohamed_Tamer . Modify code according to your needs :slight_smile:

1 Like

Thanks so much ill try now. You are a super star

Hi I have tried, please see updated code block.
I get this error now

Argument #1 ((((project) to ‘com.google.appinventor.components.runtime.util.YailDictionary.walkKeyPath(com.google.appinventor.components.runtime.util.YailObject,java.util.List)’ has wrong type (java.lang.String) (java.lang.String cannot be cast to com.google.appinventor.components.runtime.util.YailObject)
Note: You will not see another error reported for 5 seconds.


Help Would be appreciated

Nevermind. I used the raw content from thew website, Final working version here.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.