Retrieve single data from json

Hi,

For you, what error am I making?

I have a json file from which I want to retrieve my data, but I definitely make an error because my data is not displayed.!

thank you very much as always for any help or suggestions!

this is file json:

[
{
“id”: “4106da75-71b3-461d-808b-3ea0d3c1c88e”,
“status”: “draft”,
“title”: “How We Work”,
“description”: “Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”,
“items”: [
{
“title”: “Ideation”,
“content”: “Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{
“title”: “Budget”,
“content”: “Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{
“title”: “Performance”,
“content”: “Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{
“title”: “Speed”,
“content”: “Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{
“title”: “Speed 2”,
“content”: “Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{
“title”: “Budget 2”,
“content”: “Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
}
]
}
]

What is the code on the page and wha kind of data your json contains?

this is file json:

[
	{
		"id": "4106da75-71b3-461d-808b-3ea0d3c1c88e",
		"status": "draft",
		"title": "How We Work",
		"description": "Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.",
		"items": [
			{
				"title": "Ideation",
				"content": "Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus."
			},
			{
				"title": "Budget",
				"content": "Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus."
			},
			{
				"title": "Performance",
				"content": "Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus."
			},
			{
				"title": "Speed",
				"content": "Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus."
			},
			{
				"title": "Speed 2",
				"content": "Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus."
			},
			{
				"title": "Budget 2",
				"content": "Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus."
			}
		]
	}
]

Never, ever use a space in your linked files as you have done here.

image

True.
Also do you see any errors in the browser dev tools?
What is the code generated on the page (the expression you are using to display the data)?

The space is the cause of the problem. Remove it and all is well.

No error in browser.

Thanks I removed the space and if I use row repeats, as your documentation, It work well but if I want to retrive a single date without using row repeate It didn’t work.

Then my question Is? I must use Always row repeate to retrive my data ?
The II question: in my JSON i have a Array can I retrive they too? Thanks again :slight_smile:

Use Data View to filter the Data Source as in

That will give you the single record and related array.

Sorry but I don’t understand.
Starting from this Json file:
[
{
“id”: “4106da75-71b3-461d-808b-3ea0d3c1c88e”,
“status”: “draft”,
“title”: “How We Work”,
“description”: “Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”,
“items”: [
{ “id”: “0”,
“title”: “Ideation”,
“content”: “Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{“id”: “1”,
“title”: “Budget”,
“content”: “interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{“id”: “2”,
“title”: “Performance”,
“content”: “Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{“id”: “3”,
“title”: “Speed”,
“content”: “enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{
“id”: “4”,
“title”: “Speed 2”,
“content”: “quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{“id”: “5”,
“title”: “Budget 2”,
“content”: “interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
}
]
}
]

In yellow section I use a Json Data Source and repeat row to view Title and Description from Json file:
“title”: “How We Work”,
“description”: “Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”

But to display the array “item” and its data? How is it done? I tried using “Data view” but I don’t understand how it works… Is there any documentation on this?
I apologize for all the questions…but I am trying to get a handle on how to best use a json file.
:pray::pray:


:tada::tada: I got it!!! I had my starting json wrong (there were extra square brackets)…so the system didn’t see the array! thanks for any suggestions !!
This json file has been corrected:
{
“id”: “4106da75-71b3-461d-808b-3ea0d3c1c88e”,
“status”: “draft”,
“title”: “How We Work”,
“description”: “Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”,
“items”: [
{ “id”: “0”,
“title”: “Ideation”,
“content”: “Sed congue enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{“id”: “1”,
“title”: “Budget”,
“content”: “interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{“id”: “2”,
“title”: “Performance”,
“content”: “Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{“id”: “3”,
“title”: “Speed”,
“content”: “enim quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{
“id”: “4”,
“title”: “Speed 2”,
“content”: “quis interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
},
{“id”: “5”,
“title”: “Budget 2”,
“content”: “interdum imperdiet. Maecenas ut erat imperdiet, porttitor enim vel, ullamcorper purus.”
}
]
}