JSON to LIST conversion

Getting the correct output as the JSON response…
Took an empty list ( as specified in the solution in one of the questions asked here).
Now trying to append the “name” value, but I either get indices error, or I get empty list. (returning as [])

Kindly help.

1 Like

i am not getting correct response but i can help you with list, just study the response corrrectly , and by following that hirarichy in the json object ,use a loop and add it to a list

1 Like

The response object you get is a combination of various data types in python.
You need to extract them in order to which they are nested.
Keep trying. If you got the response getting the tags aren’t difficult.

1 Like

@simrankoul @Kush_Crio_TA
What are the tags? Do we have to extract ‘name’ from the json response?

1 Like

When you send the requests, you get json file which will contains some tags regarding the details of the image you provided.
You need to get the tags which are related to the food.

1 Like

I am still getting the string indices error.

1 Like

yes, names are the suggested tags

1 Like

You may check first whether the key is being getting properly accessed in string or not.
In my case this issue was there first.

1 Like

I tried that as well, but the error is still with the indices.

try using accessing the indices using the many variables

What do you mean by many variables?