dora_paz
(Dora)
August 12, 2020, 9:46am
#2
Welcome to the forum
Please show us your blocks and what you have done so far in order to get help from the community and don’t forget to read below post on how to ask a question
Asking questions
To improve the chance of getting help on the forum please follow these recommendations when posting a question:
Do your homework first
Search for similar questions/answers on the forum. Try forum search and also Google your problem.
Try to solve the problem yourself, and describe what you have tried. It is much more rewarding to help someone who has tried himself first.
Post in the right categorie, post only once and do not steal topics
Make sure that you post your question …
2 Likes
And also, we will help, not do the work .
And do what @dora_paz said, so we can understand what you want and what you have tried
1 Like
dora_paz
(Dora)
August 12, 2020, 10:27am
#5
Show us your blocks in order to help you
Rogerio_Rios
(Professional Support)
August 12, 2020, 11:13am
#7
Look This Topic :
0 — Basics
0.1 — What Is Dictionary
Dictionary is actually object JSON. Therefore, you have to know the basics of JSON. It is a way to store information in an organized, easy-to-access manner. It is formed with a key, and a value. It is called a pair. It uses a key to call the value. If you still don’t understand, search on Google for more information.
Dictionary in Kodular is a built-in block.
[image]
Object uses { bracket at the start, } at the end.
Colon is between the key and the value. C…
2 Likes
dora_paz
(Dora)
August 12, 2020, 1:06pm
#8
shibatechnology:
{“providers”:[{“provider_id”:“1”,“name”:“Airtel”},{“provider_id”:“2”,“name”:“Bsnl”},{“provider_id”:“3”,“name”:“Idea”},{“provider_id”:“4”,“name”:“Jio”},{“provider_id”:“5”,“name”:“Vodafone”}],“error”:“0”,“error_msg”:“Fetch Provider”}
I believe the problem is that this is not a valid json format ( you can validate your json here - https://jsonformatter.curiousconcept.com/ )
So what I did was to replace “ and ” with " in order to have a valid json and then used dictionary blocks and @Mohamed_Tamer 's extension that parses json to dictionary. Hope that helps
2 Likes
dora_paz
(Dora)
August 12, 2020, 4:16pm
#11
All data for key “name” is added in list to use it according to your needs
Also do you have 2 different accounts in the community @Shiba_Tech and @shibatechnology ? cause it is not allowed
Peter
(Moderator)
August 12, 2020, 4:41pm
#13
I deleted your other account, you are only allowed one.
1 Like
Show all name for spinner after click value provider_id
Example : Airtel, Vodafone, etc.
Value= 1,2,3
dora_paz
(Dora)
August 12, 2020, 5:36pm
#15
Try this, adjust code according to your needs
How to index 1 Auto
Example 1 to json row data
All index data on spinner
Example Airtel, Vodafone,etc.
dora_paz
(Dora)
August 12, 2020, 6:09pm
#18
Why don’t you try it yourself ? I showed you the way to get data from “json” . Now you have to play with the code according to your needs. I also showed you how to add elements to spinner. If you wish elements to be Airtel, Vodafone,etc. just change the list and when Spinner1.After Selecting , get selection
1 Like
dora_paz
(Dora)
August 12, 2020, 6:38pm
#20
Sorry I can not help you more, you should try it yourself
1 Like
Rogerio_Rios
(Professional Support)
August 12, 2020, 6:42pm
#21
The solution was showed by @dora_paz .
Now you should try yourself.
1 Like
dora_paz
(Dora)
August 12, 2020, 6:55pm
#23
If my answer is your solution… Then marked it as solution.
1 Like