I am trying to modify an Instagram search JS to count and display only the total number of tagged images for a certain tag.
The only response I get in my modified script is undefined, and I am clueless at this point.
You can see the API response from my request here.
What am I doing wrong or not doing at all here?
Any hint in the right direction is much appreciated…
With that structure of object you need to use the following to get
media_count:The first
datais the variable you defined for returning information from the request. The seconddatais an array – hence the[0]to access the first element in it – containing themedia_countparameter which tells you how many image were found.Example fiddle