Score:0

How to display the output of the View as json in the list of articles which use paragraphs?

sk flag

I have a content type Article which has a field_paragraph field.

Also I created a Paragraph type: View Paragraph which has a View reference field

When I create an article, in the field_paragraph field I added a reference to a view in order to get the list of titles from another content type: Basic Page.

I'm using JSON API module in order to get the list of articles in json format for a front-end application.

The problem is that Views reference field is displaying the structure of the view and not the output of the view in JSON format. For another types of paragraphs (paragraphs with a Long Text field or an image field) is not a problem to get the results in json.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.