Posts by ameego

    Hi,


    I've just started playing around with headless feature of Runway.


    I have two collection: `authors` and `news` – for which I have configure headless access. News template has a relationship with `authors` collection so that content editor can assign an author for a given news.


    I do get the json response, but the author is returned as an array of what seems to be `ids`.


    Code: author.html
    1. <perch:content type="text" title="true" id="firstname" label="First name">
    2. <perch:content type="text" title="true" id="lastname" label="Last name">
    Code: news.html
    1. <perch:content id="heading" type="text" label="Heading" required title>
    2. <perch:related id="author" collection="Authors">
    3. <p>
    4. <perch:content type="text" id="firstname">
    5. <perch:content type="text" id="lastname">
    6. </p>
    7. </perch:related>
    Code: news.json
    1. {"status":"ok","sets":{"news":[{"_id":"13","heading":"Test","_title":"Test","date":"2020-01-15","author":["10","11"],"_sortvalue":"2020-01-15"},{"_id":"14","heading":"Test2","_title":"Test2","date":"2020-01-15","author":["10"],"_sortvalue":"2020-01-15"}]}}

    Any idea on how to get the relationship to be returned as part of news.json?


    Thanks,