Parse the Array
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Parse the Array
I have the bellow array in the photo
I have get the records from MyArray 1
But i can't get the records from MyArray 2
MyArray2 have a random name!!
can anyone point me how i get it?
I have get the records from MyArray 1
But i can't get the records from MyArray 2
MyArray2 have a random name!!
can anyone point me how i get it?
Re: Parse the Array
look oh "keys" in the LiveCode dictionary
Re: Parse the Array
I have check the dictionary but i don't find anything related to this.magice wrote:look oh "keys" in the LiveCode dictionary
if i put the below code i get only 1 key the first one. <MyArray 1>
Code: Select all
put the keys of myArray1 to pKeys
Re: Parse the Array
Try
otherwise post your code so we can see how the arrays are getting built.
Walt
Code: Select all
put the keys of myArray1 [b]into [/b]pKeys
Walt
Walt Brown
Omnis traductor traditor
Omnis traductor traditor
Re: Parse the Array
I am not to sure what got you to this point, and I suspect that there may be an easier way to set up your data than this multi-dimensional array, but Try this line after the one you posted and see what it does.brandcode wrote:I have check the dictionary but i don't find anything related to this.magice wrote:look oh "keys" in the LiveCode dictionary
if i put the below code i get only 1 key the first one. <MyArray 1>Code: Select all
put the keys of myArray1 to pKeys
Code: Select all
do "put the keys of myArray["&pKeys&"] into pKeys2"
-
- VIP Livecode Opensource Backer
- Posts: 327
- Joined: Sun Apr 15, 2012 1:17 am
- Location: USA
- Contact:
Re: Parse the Array
just for curiosity, try this:
open up the messageBox and type in it: put the keys of myArray1
then type: put the keys of myArray1[myArray2]
You should be able to drill down the dimensions of your array
Then try: put myArray1[NameA]
the: put myArray1[myArray2][NameA]
You should see the data in each element
Explore with more examples by typing in the messageBox
Does this give you some insight?
note: I can't tell if you have spaces (e.g. "myArray 1" vs "myArray1") but you get the idea
open up the messageBox and type in it: put the keys of myArray1
then type: put the keys of myArray1[myArray2]
You should be able to drill down the dimensions of your array
Then try: put myArray1[NameA]
the: put myArray1[myArray2][NameA]
You should see the data in each element
Explore with more examples by typing in the messageBox
Does this give you some insight?
note: I can't tell if you have spaces (e.g. "myArray 1" vs "myArray1") but you get the idea
Cyril Pruszko
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/
-
- VIP Livecode Opensource Backer
- Posts: 9580
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Parse the Array
Hey, Newbie4
Might be time to upgrade your forum name
Craig Newman
Might be time to upgrade your forum name
Craig Newman
-
- VIP Livecode Opensource Backer
- Posts: 327
- Joined: Sun Apr 15, 2012 1:17 am
- Location: USA
- Contact:
Re: Parse the Array
Thank you for the nice complement but I still have much to learn. I am nowhere in the league with you, Simon and the others. Besides, I would not know where to change my name or what to.
I am just glad to be able to help others learn LiveCode.
Thanks again,
Cyril
I am just glad to be able to help others learn LiveCode.
Thanks again,
Cyril
Cyril Pruszko
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/