JSON, [dict] question: Getting an object from an array

maaark's icon

Hi all,

I'm trying to use the OpenWeatherAPI: http://openweathermap.org/API

See the patch below.

However, I'm trying to extract weather::id and main, but these are objects inside an array.

How can I extract these using dict?

Thanks in advance! :)

Max Patch
Copy patch and select New From Clipboard in Max.

Admin Support HEMU-CL's icon

use javascript, it's very easy. the help of dict object has everything you need, look inside the script in the help of dict!
A-

maaark's icon

Ah, yes. Thanks. Was looking for an easier way as I'm trying to show some first-year student but I guess this is a good introduction to js anyway :)