---
title: "Consuming JSON feed using Feeds and JSONPath Parser · Appnovation"
url: "https://www.appnovation.com/insights/consuming-json-feed-using-feeds-and-jsonpath-parser"
description: "How to consume a JSON feed in Drupal using the Feeds module and JSONPath Parser to import content from external systems."
---

Article

# Consuming JSON feed using Feeds and JSONPath Parser

[![](https://cdn.sanity.io/images/ey850001/production/f0e6f26b2d1cd656f2bc33b49d25cf5cb8d44e93-68x68.png?w=68&auto=format) rllabore rllabore Developer](/people/rllabore-rllabore.md) Dec 16, 2011  
 3 min read 

![Appnovation Blog Default Header](https://cdn.sanity.io/images/ey850001/production/9efe1c26d9584ecfb3dfef5a63e698bf4567d305-1440x600.jpg?w=1400&auto=format) 

One of the best aspects about [Drupal development](/services/drupal-development.md) is its interoperability. Drupal can be integrated with almost all systems(CMS/ECM/DM)out there. There are so many ways to import content from other systems to Drupal. How you implement it will depend on some factors(budget, time constraint, 3rd party system constraints). If you need to consume a JSON feed and convert them into nodes, try using feeds module in conjunction with feeds\_jsonpath\_parser module. Use feeds to consume data from a given URL and feeds\_jsonpath\_parser to traverse through the JSON data and map elements to CCK fields. JSONPath allows you to traverse JSON string like XPATH is used to traverse XML contents. Here is an sample use case that we will solve using Feeds/JSONPath Parser: We need to extract the list of employee information from a given system. We have created an employee content type that will encapsulate employee information that we will consume from a 3rd party system. The employee content type will contain the following fields:

*   Last name (field\_employee\_lname)
*   First name (field\_employee\_fname)
*   Employee ID (field\_employee\_emp\_id)
*   Position (field\_employee\_position)

Here is the sample JSON string that we will consume:

{"companies":{"company\_a":{"employees":\[{"position":"Developer","first\_name":"Bob","last\_name":"Williams","employee\_id":1},{"position":"Developer","first\_name":"Dave","last\_name":"Ali","employee\_id":2},{"position":"Developer","first\_name":"Jon","last\_name":"Davis","employee\_id":3}\]}}}

Here is the list of modules used:

*   feeds (and its dependencies)
*   feeds\_import
*   feeds\_ui
*   feeds\_json
*   path\_parser

Here are the steps in order to consume that JSON feed:

1) Navigate to admin/build/feeds/create

2) Enter importer name and description.

3) Click create. NOTE: You will be redirected to the importer configuration page.

4) Modify the following basic settings and click save: - Attach to content type setting: Feed Item - Minimum refresh period: 1 day

5) Make sure the Fetcher is set to HTTP Fetcher.

6) Change Parser to JSONPath parser.

7) Change Processor to Node processor.

8) Modify the following node processor settings and click save. - Content Type: employee - Author: admin - Authorize: checked - Expire: never - Update existing nodes: replace existing nodes

9) Map the following JSONPath expressions with the appropriate employee content type fields.

10) Modify the JSONPath parser settings and click save: - Context: $.companies.company\_a.employees\[\*\] - title(node title): last\_name - field\_employee\_last\_name: last\_name - field\_employee\_first\_name: first\_name - field\_employee\_emp\_id: employee\_id - guid: employee\_id NOTE: Modifying JSONPath settings tells Feeds how to traverse the JSON string and retrieve specific data that Drupal needs to build an employee content.

11) Navigate to admin/build/feeds

12) Create a feed item node that will be responsible for fetching the JSON content by clicking Feed Item (under “Attached to”). 1

3) Enter node title and feed URL.

NOTE: When cron runs, feeds will look for the feed item node that you created and will consume the JSON content from the specified URL. You can also manually consume the JSON content by navigating to the node page of the feed item, clicking the import tab and then clicking import.

[![](https://cdn.sanity.io/images/ey850001/production/f0e6f26b2d1cd656f2bc33b49d25cf5cb8d44e93-68x68.png?w=68&auto=format) rllabore rllabore Developer · Appnovation](/people/rllabore-rllabore.md) 

## Keep reading

[![What is Sovereign AI](https://cdn.sanity.io/images/ey850001/production/a5889abdd5e80376912546622e046e3fbef234b4-2496x1664.png?w=640&auto=format)](/insights/what-is-open-source-sovereign-ai.md)

 Article · 7 min AI 

### [What Is Open Source, Sovereign AI?](/insights/what-is-open-source-sovereign-ai.md)

Every company is encouraging more AI, and almost every AI bill is climbing. Sovereign AI is about two kinds of control: over your data and over your costs. Here's why open source sits at its foundation.

[Iain MacNeil](/people/iain-macneil.md) Article 

[![AI-first experience design](https://cdn.sanity.io/images/ey850001/production/8bbc2418e87924ef10f36115478a2e10d5bed95e-1584x624.jpg?w=640&auto=format)](/insights/how-build-ai-first-experience-without-throwing-out-everything-youve-already-built.md)

 Article · 6 min AI Sep 10, 2026 

### [How to Build an AI-First Experience Without Throwing Out Everything You've Already Built](/insights/how-build-ai-first-experience-without-throwing-out-everything-youve-already-built.md)

Users now expect a direct answer, not a list of links to click through. Here's how organizations can layer an AI-First experience onto their existing website or app, in weeks rather than years.

[Andrew Douglas](/people/andrew-douglas.md) Article 

[![What Becomes Possible When AI Can Read All the Data](https://cdn.sanity.io/images/ey850001/production/c28ab0bd26753421ee42937e13adc7a7f19b47f0-1296x510.jpg?w=640&auto=format)](/insights/what-becomes-possible-when-ai-can-read-all-data.md)

 Article · 4 min AI Sep 09, 2026 

### [What Becomes Possible When AI Can Read All the Data](/insights/what-becomes-possible-when-ai-can-read-all-data.md)

Most of the world's data has never been analyzed, only sampled. AI changes that. How AI-ready data platforms unlock questions no one could ask before.

[Appnovation](/people/appnovation.md) Article 

## Get the thinking,  
*before everyone else.*

One considered email a month. New essays, field notes from live engagements, and the occasional strong opinion. No noise.
