Skip to main content
Nintex Community Menu Bar

I have looked for an example of this and unfortunately cannot find anything for what I believe is common operation: Get the value of a specific column by name using JSON Path

 

Query Sharepoint list - easy

Loop through the collection

Get Item from collection

     this is where I get lost,

     must use a JSON Path Query but all examples I find expect a header for the data. 

     Like this:

    

 

  my data is like

{“Column”:”data”, “Column”:”data” etc. .. }

How to query for the value of a specific column?????

 

Thanks you

Hi @Roboman,

Nintex for SharePoint does not support the parsing of JSON out of the box.

You could extract what you need using string functions and regular expressions.
If your query returned XML, you could use the XML actions.


Sorry I should have mentioned using Nintex Cloud and action Query JSON to get the field from the returned value of Get Items from Collection (returns a JSON string.

Thanks for your fast reply and again sorry for my inaccurate description


Hi @Roboman 

If you are using Automation Cloud then handling objects from sharepoint is a lot easier, I don’t think its common that you would need to even use query JSON to get a value, typically I would either loop the collection or use collection operations to get the value I need.

Can you explain the specific scenario you have and I would see if I can show you the best way to do it. 

Jake 


Jake,

Thank you for your response.

Although I do have it working using JSON I would like to understand a better way.

 

Scenario:

Find all list items with a “ExpireDate” withing 30 days of taoday

Query a list using “ExpireDate” after “CurrentDate” (to limit items returned,)

Loop For each (Items in collection)

    Get from Collection (returns a JSON string of all columns:values)

    Query JSON (to get the field values I need)

    etc. (rest is simply grabbing the data I need and working on it)

 

Thank again

 


Hi @Roboman 

It should be fairly straight forward in that case, I think perhaps the older methods of doing this are causing some trouble, the new way is much better, see below how to loop returned items and act on them. 

Setting up my query to get list items (conditions are not relevant to the requirement) we are going to store everything in expired items:

 


Now we use the result of that in the loop for each as you have already:

 


Making sure to add the Items collection:
 


In Nintex Automation Cloud, Loop for each can expand objects, the Items collection is an object in this scenario so now if we use an action in the loop, we can go to the newly created loop for each variable and this will contain all of the fields for the current item in the loop.

 


Going into that variable will show all of the list fields:


​​​​​​​There is no need to use query JSON in this scenario as the connector platform already prepared the object for the workflow. 

If there are any actions you need to perform on each item make sure to keep them inside this loop and only use the variables in the loop for each area:



Hope this helps. 


Thanks so much for this very clear explanation.

You would think with such a common query I would have found many examples but nope :(

Just to be clear I use a condition to avoid the 5000 record problem.

Thanks again

 


Reply