I am currently working on extracting a JSON path for the specific HTML content with the language code DE
Below is an example of the JSON data:
{
"name": "Name",
"text": "",
"html": "HTML content",
"tags": [],
"translations": [
{
"html": "Irrelevant HTML content",
"text": "",
"language": {
"code": "AF",
"name": "AF"
}
},
{
"html": "Desired HTML content",
"text": "",
"language": {
"code": "DE",
"name": "German"
}
}
],
}
So far, I have only managed to access the first translation using
const afLang = requestPromptsJsonRequest.translations[0].html;
in Cypress. I am still figuring out how to filter by language code rather than just the index number in the translations array.