Hello,
I want to access the object values through the render function in order to display the values in a table.
// Create the render function
const renderHits = (renderOptions, isFirstRender) => {
const { hits, widgetParams } = renderOptions;
widgetParams.container.innerHTML = `
<tr>
${hits
.map(
item =>
`<tr>
<td>
${instantsearch.highlight({ attribute: 'name', hit: item })}
</td>
<td>
${instantsearch.highlight({ attribute: 'nationality_text', hit: item })}
</td>
<td>
// languages is an object, i want to access to languages.language_text
${item.languages}
// Output in my HTML :
// [object Object]
</td>
</tr>`
)
.join('')}
</tr>
`;
};
Thank you very much in advance for your help