> For the complete documentation index, see [llms.txt](https://easyedge.gitbook.io/easyedge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://easyedge.gitbook.io/easyedge/how-to/edge-data-processing/use-expressions-to-parse-data-at-the-edge.md).

# Use Expressions to Parse Data at the Edge

In EasyEdge, Expressions can also be used to **parse and extract information** from raw values such as strings or JSON payloads.

This allows you to transform unstructured or semi-structured data into clean, usable fields directly at the edge, before sending it to your applications.

***

## When to Use Tag vs Data Stream Parsing

### **Tag Parsing**

* Apply parsing directly at the **Asset Tag** level when you always want the extracted value to be available as part of the Asset.
* Example: Parsing a JSON string field to extract a sensor reading and storing it as a dedicated Tag.

### **Data Stream Parsing**

* Apply parsing at the **Data Stream** level when you only need the extracted value for a specific application, while keeping the raw data available at the edge.
* Example: Delivering only a parsed field (such as temperature) to an application, while the full JSON string remains stored locally.

***

## EasyEdge Expression Assistant

The **Expression Assistant** supports parsing functions as well, making it easier to build and validate string or JSON operations.

* As you type, the assistant suggests functions like `$concat`, `$format`, `$parse`, `$split`, and more.
* Each variable is mapped to a **Data Field** or **Tag**, ensuring you know exactly which input you are parsing.
* Expressions are validated in real time, and errors are clearly shown if the syntax or identifiers are invalid.

<figure><img src="/files/dYA1uOuqqzsZKzejdn5I" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
💡 **Tip:** For the full list of available data functions, see the [Expressions - Operations Engine](/easyedge/reference/expressions-operations-engine.md) page.
{% endhint %}

***

## Example: Parse a String

In this example, we parse a JSON string to extract a specific field value.

Expression:

<figure><img src="/files/i8V6VLt8Hn3iekemK8VQ" alt=""><figcaption></figcaption></figure>

Where `a` is a variable mapped to the original JSON string.&#x20;

***

## Additional Example: Combining Multiple Operations

ou can also chain multiple data operations together. For example, you may first **parse** a JSON string and then **split** the result into different values.

Expression:

<figure><img src="/files/SAXQKp2ip5NzcuHhdnqN" alt=""><figcaption></figcaption></figure>

This example:

1. Uses `$parse` to extract a value from JSON.
2. Then applies `$split` to separate the string into parts.

***

## Where to Apply Parsing

Whether you use a single parsing function (like `$parse`) or combine multiple functions (such as `$parse` and `$split`), you can decide **where** to apply the parsing depending on your project design:

* **Asset Tags** → Use when you want the Asset itself to always hold the parsed value, making it directly available at the Edge.
* **Core Tags** → Use when you prefer to keep the original Asset untouched, and instead create new Core Tags that store parsed results (especially useful when parsing requires combining inputs across Assets).
* **Data Streams** → Use when you only need parsed data delivered to a specific Application, while keeping the original data structure standard at the Edge.

This flexibility ensures you can adapt parsing to the **right level of abstraction** — at the Asset, at the Core, or at the Application delivery stage.

***

## Key Considerations

* Use **Tag Parsing** for values you always want extracted and available in the Asset.
* Use **Data Stream Parsing** when only specific applications need the parsed values.
* Combine multiple parsing operations (`$parse`, `$split`, `$concat`, etc.) to handle more complex data formats.
* Always validate your expression with the **Expression Assistant** to ensure correctness before saving.
