---
title: "How to extract JSON with Extractor and Rest-Extractor"
description: "Extracting JSON into Geneos can be done using Extractor or Rest-Extractor plugins. Extractor uses xpath with JSON converted to XML, while Rest-Extractor uses simpler JQ queries for JSON extraction."
url: "https://docs.itrsgroup.com/docs/faq/geneos/360017159737-geneos-how-to-extract-json-with-extractor-and-rest-extractor/index.html"
---
The Rest-Extractor plugin can be used to get JSON format into Geneos. Some users prefer to read JSON from a file, rather than accessing the JSON through `http` or `https`. The following examples use both plugins, so that you can compare and and get a feel of the different. The JSON file is in `/var/www/html` and the `httpd` is in the Linux server.

```
[
{"MON":{"Host":"hkserver101.net","AlertID":"HK0101","Cmp":"instrument","Lvl":"I","Data":{"Usd":8088,"Max":85000,"Pct":12.231213,"Lmt":50.0},"Timestamp":"20201113.110008.333880"}},
{"MON":{"Host":"hkserver201.net","AlertID":"HK2020","Cmp":"price_1","Lvl":"I","Data":{"Usd":123,"Max":30000,"Pct":59.2123,"Lmt":50.0},"Timestamp":"20201113.120008.323072"}}
]
```

Both plugins result to identical outputs:

Extractor plugin:

![Extractor plugin output](https://docscdn.itrsgroup.com/faq/images/geneos/extractor-plugin-output.png)

Rest-Extractor plugin:

![Rest-Extractor plugin output](https://docscdn.itrsgroup.com/faq/images/geneos/rest-extractor-plugin-output.png)

Using Extractor, you need to know how to use xpath. Geneos convert JSON to xml in extractor plugin, if you want to know about the path, you can do this:

![JSON to XML via debug](https://docscdn.itrsgroup.com/faq/images/geneos/debug-JSON-to-XML.png)

​And you will get this:

![JSON to XML conversion output](https://docscdn.itrsgroup.com/faq/images/geneos/ouput-JSON-to-XML.png)

Rest-Extractor provides a simpler approach, by using JQ query:

![JQ query](https://docscdn.itrsgroup.com/faq/images/geneos/JQ-query.png)

For reference, the xml for [Extractor.txt](/faq/downloads/geneos/Extractor.txt) and [Rest_Extractor.txt](/faq/downloads/geneos/Rest_Extractor.txt) can be downloaded and tested.


