From 3061cc17bb18e73746ece4959d0a12e1de402c6d Mon Sep 17 00:00:00 2001 From: mpetrov Date: Tue, 18 Mar 2025 18:21:12 +0200 Subject: [PATCH] Updated md files --- .../en_US/widget/lib/gateway/rest-json_fn.md | 15 ++++++++------- .../en_US/widget/lib/gateway/rest-url_fn.md | 17 +++++++++-------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/ui-ngx/src/assets/help/en_US/widget/lib/gateway/rest-json_fn.md b/ui-ngx/src/assets/help/en_US/widget/lib/gateway/rest-json_fn.md index 9b3012c00d..14e0a86d6a 100644 --- a/ui-ngx/src/assets/help/en_US/widget/lib/gateway/rest-json_fn.md +++ b/ui-ngx/src/assets/help/en_US/widget/lib/gateway/rest-json_fn.md @@ -1,6 +1,7 @@ -### JSON Path: +### Expressions +#### JSON Path -The expression field is used to extract data from the HTTP response message. +The expression field is used to specify the path for extracting data from an HTTP response message. JSONPath expressions specify the items within a JSON structure (which could be an object, array, or nested combination of both) that you want to access. These expressions can select elements from JSON data on specific criteria. Here's a basic overview of how JSONPath expressions are structured: @@ -8,7 +9,7 @@ JSONPath expressions specify the items within a JSON structure (which could be a - `.`: Child operator used to select child elements. For example, $.store.book ; - `[]`: Child operator used to select child elements. $['store']['book'] accesses the book array within a store object; -### Examples: +#### Examples For example, if we want to extract the device name from the following message, we can use the expression below: @@ -28,7 +29,7 @@ HTTP response message: } ``` -Expression: +JSON Path Expression `${sensorModelInfo.sensorName}` @@ -36,7 +37,7 @@ Converted data: `AM-123` -If we want to extract all data from the message above, we can use the following expression: +For extracting all data from the message above, use: `${data}` @@ -44,10 +45,10 @@ Converted data: `{"temp": 12.2, "hum": 56, "status": "ok"}` -Or if we want to extract specific data (for example “temperature”), you can use the following expression: +For extracting a specific value, such as the temperature, use: `${data.temp}` -And as a converted data we will get: +Converted data: `12.2` diff --git a/ui-ngx/src/assets/help/en_US/widget/lib/gateway/rest-url_fn.md b/ui-ngx/src/assets/help/en_US/widget/lib/gateway/rest-url_fn.md index eccb52b96e..33ff4e6172 100644 --- a/ui-ngx/src/assets/help/en_US/widget/lib/gateway/rest-url_fn.md +++ b/ui-ngx/src/assets/help/en_US/widget/lib/gateway/rest-url_fn.md @@ -1,14 +1,15 @@ -## Request URL expression +### Expressions +#### Request URL -JSONPath expression uses for creating url address to send a message. +JSONPath expressions are used to construct URL addresses for sending messages. -JSONPath expressions specify the items within a JSON structure (which could be an object, array, or nested combination of both) that you want to access. These expressions can select elements from JSON data on specific criteria. Here's a basic overview of how JSONPath expressions are structured: +JSONPath expressions specify items within a JSON structure (objects, arrays, or a nested combination) that you wish to access. These expressions can select elements from JSON data on specific criteria. Here's a basic overview of how JSONPath expressions are structured: - `$`: The root element of the JSON document; - `.`: Child operator used to select child elements. For example, $.store.book ; - `[]`: Child operator used to select child elements. $['store']['book'] accesses the book array within a store object; -### Examples: +#### Examples For example, if we want to extract the device name from the following message, we can use the expression below: @@ -28,7 +29,7 @@ HTTP response message: } ``` -Expression: +Url Expression: `${sensorModelInfo.sensorName}` @@ -36,7 +37,7 @@ Converted data: `AM-123` -If we want to extract all data from the message above, we can use the following expression: +For extracting all data from the message above, use: `${data}` @@ -44,10 +45,10 @@ Converted data: `{"temp": 12.2, "hum": 56, "status": "ok"}` -Or if we want to extract specific data (for example “temperature”), you can use the following expression: +For extracting specific data (e.g., "temperature"), use: `${data.temp}` -And as a converted data we will get: +Converted data: `12.2`