Accessing string[] Data Type in Typesense Demos

TLDR Vishal inquired about accessing string[] datatype fields in Typesense demos. Jason suggested using console.log, but the issue remains unresolved.

Photo of Vishal
Vishal
Mon, 12 Jun 2023 14:26:27 UTC

For the various typesense demos (showcase xkcd, etc), if a datatype field in the schema is string[], does it now work? if so, how can we access it? (eg ${data.fieldname} doesn't work)

Photo of Jason
Jason
Mon, 12 Jun 2023 16:23:03 UTC

If you `console.log(data)` you’ll see the variables inside the item

Photo of Jason
Jason
Mon, 12 Jun 2023 16:23:29 UTC

(I would expect `${data.fieldname}` to work on a side note as long as you haven’t excluded that field using `exclude_fields` or `include_fields`)

Photo of Vishal
Vishal
Mon, 12 Jun 2023 16:23:51 UTC

it works for string fields but not for string[]

Photo of Jason
Jason
Mon, 12 Jun 2023 16:24:19 UTC

Hmm, could you try console.log?