0

Hi i have an array like this; Var MyArray:[{title:"test title" price:34553}] How can ı acces title name

I tried MyArray.title but it returms undefinded how can ı solve this

  • 1
    you should find a basic js tutorial, `:` is wrong it should be `=`, then is `MyArray[0].title`, arrays use indexes – Lawrence Cherone Apr 23 '23 at 15:45
  • SO is not a site to teach you programming. Grab a javascript beginners tutorial which will help you with your first steps – derpirscher Apr 23 '23 at 15:48
  • also read the documentation for basic operations and examples: [MDN: Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) and [MDN: Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) – pilchard Apr 23 '23 at 15:53

1 Answers1

0

you can use this code

MyArray[index].property