Talk:Array

From NSB App Studio
Jump to navigation Jump to search

You can define dimensional Array:


   myData = [ {firstName: "Tommy", lastName: "Maintz"}, _
              {firstName: "George", lastName: "Higgins"}, _
              {firstName: "Jamie", lastName: "Avins"}, _
              {firstName: "Aaron", lastName: "Conran"}, _
              {firstName: "Dave", lastName: "Kaneda"}, _
              {firstName: "Michael", lastName: "Mullany"}, _
              {firstName: "Abraham", lastName: "Elias"}, _
              {firstName: "Jay", lastName: "Robinson"}, _
              {firstName: "Tommy", lastName: "Maintz"}, _
              {firstName: "Ed", lastName: "Spencer"} _
            ]
    
   s=JSON.stringify(myData)
    
   myParsedArray= JSON.parse(s)

   Dim tmpText
   tmpText=""

   For i=0 To UBound(myParsedArray)
     tmpText +=  myParsedArray[i]["firstName"] & vbCRLF
   Next
   
   MsgBox tmpText