I want to do list of poems- I already create the list and create data.json file as shown down
[
{
"title": "Red Rose",
"photo": "Red_Rose",
"poem": [
"Roses are red",
"Violets are blue",
"Sugar is sweet",
"And so are you."
]
}
]
and create detail page to display the poem, but the page show the poem like this
[ “Roses are red”, “Violets are blue”, “Sugar is sweet”, “And so are you.” ]
and my detail file like this
item.poem is an JSON array so our output is not as expected.
You could loop trough the item.poem within your item loop and output the single lines with a break or whatever.
Btw: Putting your code in a pre-formatted block makes it more readable
Please edit your post and use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.