-4

Say I have an array like:

var someArray = [{"id":1,"mid":"477","mname":"StackOverflow","image":"images/merchants/so.jpg"}, {"id":2,"mid":"478","mname":"Meta","image":"images/merchants/mt.jpg"}]

How do I get say the image string images/merchants/so.jpg for example?

angus
  • 424
  • 9
  • 28
  • @Qantas94Heavy not exactly. The main array in that one has keys. This one does not. – angus Jun 16 '15 at 14:59
  • 1
    this should work `someArray[0].image` – Dhiraj Jun 16 '15 at 14:59
  • @D-Day the question is extremely similar and the answers there should explain how to access objects like these -- the question I linked to was meant to address these types of questions in general. – Qantas 94 Heavy Jun 16 '15 at 15:00

1 Answers1

0
someArray[0].image
or
someArray[0]['image']
mnickell
  • 66
  • 3