Return JSON array without extra square brackets
change $products[] = to $products = in your for each loop, that should fix the extra square brackets. And if you want to get all entries and their titleVariation fields you should use 'elementType' =&gt; Entry::Class

'pricelist/&lt;entryId:\d+&gt;.json' =&gt; function($entryId) {
    return [
        'elementType' =&gt; Entry::Class,
        'criteria' =&gt; [
            'section' =&gt; 'products',
            'descendantOf' =&gt; $entryId,
        ],
        'transformer' =&gt; function(Entry $entry) {

            $products = [];
            // "orderItem" is entry field
            foreach ( $entry-&gt;orderItem as $product ) {
                $products = [
                    'title' =&gt; $product-&gt;titleVariation,
                ];
            }
            return $products;
        },
    ];
},