json_select(v(Field name), jmes="")
Parameter | Description | Parameter Type | Required | Default Value | Value Range |
data | Field value, which can be extracted by other functions | string | Yes | - | - |
jmes | JMES expression | string | Yes | - | - |
{"field": "{\\"a\\":{\\"b\\":{\\"c\\":{\\"d\\":\\"success\\"}}}}", "status": "500"}
fields_set("message", json_select(v("field"), jmes="a.b.c.d"))
{"field":"{\\"a\\":{\\"b\\":{\\"c\\":{\\"d\\":\\"success\\"}}}}","message":"success","status":"500"}
xml_to_json(Field value)
Parameter | Description | Parameter Type | Required | Default Value | Value Range |
data | Field value | string | Yes | - | - |
{"xml_field": "<note><to>B</to><from>A</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></note>", "status": "500"}
fields_set("json_field", xml_to_json(v("xml_field")))
{"xml_field":"<note><to>B</to><from>A</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></note>","json_field":"{\\"to\\":\\"B\\",\\"from\\":\\"A\\",\\"heading\\":\\"Reminder\\",\\"body\\":\\"Don't forget me this weekend!\\"}","status":"500"}
json_to_xml(Field value)
Parameter | Description | Parameter Type | Required | Default Value | Value Range |
data | Field value | string | Yes | - | - |
{"json_field":"{\\"to\\":\\"B\\",\\"from\\":\\"A\\",\\"heading\\":\\"Reminder\\",\\"body\\":\\"Don't forget me this weekend!\\"}", "status": "200"}
fields_set("xml_field", json_to_xml(v("json_field")))
{"json_field":"{\\"to\\":\\"B\\",\\"from\\":\\"A\\",\\"heading\\":\\"Reminder\\",\\"body\\":\\"Don't forget me this weekend!\\"}","xml_field":"<ObjectNode><to>B</to><from>A</from><heading>Reminder</heading><body>Don't forget me this weekend!</body></ObjectNode>","status":"200"}
if_json(Field value)
Parameter | Description | Parameter Type | Required | Default Value | Value Range |
data | Field value | string | Yes | - | - |
{"condition":"{\\"a\\":\\"b\\"}","status":"500"}
t_if(if_json(v("condition")), fields_set("new", 1))
{"new":"1","condition":"{\\"a\\":\\"b\\"}","status":"500"}
{"condition":"haha","status":"500"}
t_if(if_json(v("condition")), fields_set("new", 1))
{"condition":"haha","status":"500"}
Apakah halaman ini membantu?