How to return a list of tags provided byt the Clarifai API in views.py?

Hi @Sonali_Sharma
Looks like you are facing challenges in the current module.

Below are a few similar topics raised by other users which you might find usefull

Note - This is a BETA Feature,if you find this helpful, kindly let us know.
Feedback link - https://forms.gle/cmxN5pdTXgnwgC986

Kindly mark this as a solution if this has helped you solve your query

I am not able to get the answer?

Only 1 test case is failing.Don’t know why?

You can do this in the following process.
1. Create an empty list.
2. Then let y is equal to response.json() of [‘outputs’] and in that just select the first field.
3. Then let x is equal to y of [‘data’] in that go into the [‘concepts’]
4. Then just create a for loop and extract the ‘name’ as we have done parsing in the above 2 instructions. Add those tags into the empty list created in first instruction.

To know more about how to use dictionary in python to parse a JSON.
https://linuxconfig.org/how-to-parse-data-from-json-into-pythonhttps://www.geeksforgeeks.org/convert-json-to-dictionary-in-python/

This would also be helpful.
https://www.haykranen.nl/2016/02/13/handling-complex-nested-dicts-in-python/

Since you have opened a new ticket here


I am closing this one

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.