I have an array like this:
elements = {
opinions: ['p31/php/endpoint.php?get=opinions'], // function to call and API endpoint, php/endpoint.php
top3positive: ['p31/php/endpoint.php?get=top3positive'], // function to call andAPI endpoint, php/endpoint.php
top3negative: ['p31/php/endpoint.php?get=top3negative'], // function to call andAPI endpoint, php/endpoint.php
};
How do I point to the 1 first array. If I do alert(elements[0]);
it is not returning opinions as I would expect.
What am I doing wrong?
I need to point to the array index based on its order 0,1,2 etc.
Thanks