cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
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