How to get an element query into json (for vue) without extra data? Lets say I want to get a list of category names and ids and pass them into JSON (for vue.js).

This is how I'm currently doing it:

{% set sections = craft.categories.group('teamCategory').select(['title','elements.id','groupId']).all() %}

&lt;!-- My vue.js tag: --&gt;
&lt;team :sections="{{ sections|json_encode() }}"&gt;&lt;/team&gt;


My problem is that I only want title and id to be passed to vue, but craft/twig is passing load and loads more data that forms part of the category object. 

Is there an easy way to just pass the array columns I need?
You can use the asArray function to return arrays instead of elements

{% set sections = craft
    .categories
    .group('teamCategory')
    .select(['title','elements.id','groupId'])
    .asArray()
    .all() 
%}