cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
hyue
Level I

Converting Between Data Tables and Associative Arrays

Hi there,

 

Is there a simple way to convert a data table to an associative array?  I'm trying to pass the associative array to an external API for analysis, and then getting the results back into JMP as a data table afterwards.

 

Thanks!

 

Howard

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Converting Between Data Tables and Associative Arrays

Check the scripting index (Help > Scripting Index).  The AA will accept a matrix or a list as an input when you create it.  So, the easiest way would be to get your Key column as a list, your value column as a list, and pass those to the AA command as the Keys and Values.  

 

If you want to get multiple columns into your Value for a given Key you can do that too.  There are some great examples in the scripting guide (Help > Books > JMP Scripting Guide).  You can also look at the code I use here: Total Recall: A new strategy for Recall support in JMP applications for some examples on how I work with AA's.

 

M

 

 

View solution in original post

2 REPLIES 2

Re: Converting Between Data Tables and Associative Arrays

Check the scripting index (Help > Scripting Index).  The AA will accept a matrix or a list as an input when you create it.  So, the easiest way would be to get your Key column as a list, your value column as a list, and pass those to the AA command as the Keys and Values.  

 

If you want to get multiple columns into your Value for a given Key you can do that too.  There are some great examples in the scripting guide (Help > Books > JMP Scripting Guide).  You can also look at the code I use here: Total Recall: A new strategy for Recall support in JMP applications for some examples on how I work with AA's.

 

M

 

 

hyue
Level I

Re: Converting Between Data Tables and Associative Arrays

Thanks, M.  That was a good idea and I have implemented it.

 

Howard