-
Notifications
You must be signed in to change notification settings - Fork 1
Basic operations
MACK Mathieu edited this page Jan 23, 2022
·
2 revisions
This page describes sample operations of transformations on your json content.
It describes json operations. Not C# script to do it as it's already described at the Home page 😀
All selection of data on your json input can be done by using a jsonpath expression.
You can easily test your selector by using this online tool.
This sample describes how to retrieve a field value.
Input :
{
"field": {
"subField": true
}
}
Transformation :
{
"resultField": "$.field.subField"
}
output :
{
"resultField": true
}
This sample describes how to retrieve a field value from an array as input. Input :
[
{
"field": true
},
{
"field": false
}
]
Transformation :
{
"resultField": "$.[1].field"
}
output :
{
"resultField": false
}
This sample describes how to get the second item on an array :
Input :
{
"fields": [ "string 1", "string 2"]
}
Transformation :
{
"resultField": "$.fields[1]"
}
output :
{
"resultField2": "string 2"
}