How to get data from many to many relationship as nested object with key in mongodb with cudebs (Mongodb BI connector)

I have many to many relationship in mongodb in collection A i have key (dynamicFieldValue) in which i story objects with id and key as you can see screen attached image
in collection B i have key as ticket_ids in which i store id tickets.
now i have to create relationship between them and get data for cubeJS

joins: {
    DynamicFields : {
      sql: `${CUBE}.dynamicFieldsValue.*._id = ${DynamicFields}._id`,
      relationship: `belongsTo`
    }
  }, 

It shows me an error

parse sql ‘SELECT
dynamic_fields.name dynamic_fields__name, count(tickets._id) tickets__count
FROM
tickeingSystem.tickets AS tickets LEFT JOIN tickeingSystem.dynamic_fields AS dynamic_fields ON
tickets.dynamicFieldsValue.*._id = dynamic_fields._id GROUP BY 1
ORDER BY 2 DESC LIMIT 5000′ error: unexpected TIMES at position 246

enter image description here
enter image description here