Well-Formed list of pairs Error

I keep getting not a well-formed list of pairs error, and I have tried to fix it, but it is not working. This is my code. I am using an API as well.

Can anyone help?

Show us the raw response content.

Now show us the raw responseContent.....(as text)

Nice "image"

[{"id":59737,"title":"Honey Apple Cake","image":"https://spoonacular.com/recipelmages/59737-312x231.jpg","imageType":"jpg","usedIngredientCount":2 ,"missedIngredientCount":1,"missed Ingredients":[{"id":19296,"amount":0.25,"unit":"cup","unitLong":"cups","unitShort":"cup","aisle":"Nut butters, Jams, and Honey","name":"honey","original":"1/4 cup honey","originalName":"honey","meta":[],"image":"https://spoonacular.com/cdn/ingredients_100x100/honey.png"}] ,"usedIngredients":[{"id":9003,"amount":1.0,"unit": "cup","unitLong":"cup","unitShort":"cup","aisle":"Produce","name":"apples","original":"1 cup apples", "originalName":"apples" ,"meta":[],"image":"https://spoonacular.com/cdn/ingredients_100x100/apple.jpg"},{"id":2010,"amount":1.0,"unit":"tsp","unitLong":"teaspoon","unitShort":"tsp","aisle":"Spices and
Seasonings","name":"cinnamon","original":"1 tsp cinnamon","originalName":"cinnamon","meta":[],"image":"https://spoonacular.com/cdn/ingredients_100x100/cinnamon.jpg"}] "unused Ingredients":[],"likes":17}]

but still probably not the responseContent:

Looking at your image, I see a list [] of dictionaries, not just one dictionary.

So you need to select item 1 and then treat that item as a dictionary.

P.S. I have been experimenting with YAML, a vertical representation of structures like dictionaries and lists.

Run your structure through yaml_doc to see a vertical representation of it you can scroll.

P.S. These blocks can be dragged directly into your Blocks Editor workspace.

See A way to group projects by theme - #10 by ABG
for a demo.

Are you sure you want to show the entire dictionary in the label (twice) when getting the id and the title values ?

What are the global variables set to?

I do have been using .yml and thinking to be an another configuration/data file format, but your definition is very explanatory.

What global variables?

I only have one global, JSON, and it is set in one of the test setup procedures.

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