cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

want to set of session variable one parameter string value to null

PK_10315615
3-Newcomer

want to set of session variable one parameter string value to null

Tring to set value of bsl as null but other properties values like temperature or owner should remain same in session.

 

this is the session input:

 

{"containerListFilters":{"location":[],"temperature":[{"array": [{"list_id": 1,"list_name": "RT"}]}],"owner":[], "bsl":[{"array": [{"list_id": 1,"list_name": "BSL 1"}]}]}}

 

output should be:

{"containerListFilters":{"location":[],"temperature":[{"array": [{"list_id": 1,"list_name": "RT"}]}],"owner":[], "bsl":[{"array": []}}

 

how can write the code for this?

 

 

ACCEPTED SOLUTION

Accepted Solutions

Hi @PK_10315615 

Don't know how setting a JSON element is related to session parameter but you can create a custom JS service in ThingWorx with a JSON input say called "input" and output as JSON

 

input.containerListFilters.bsl[0].array = [];
result = input;

 

Tony

View solution in original post

1 REPLY 1

Hi @PK_10315615 

Don't know how setting a JSON element is related to session parameter but you can create a custom JS service in ThingWorx with a JSON input say called "input" and output as JSON

 

input.containerListFilters.bsl[0].array = [];
result = input;

 

Tony
Announcements


Top Tags