I am currently integrating Microsoft Azure Cognitive Services text recognition API into a JavaScript web application.
After successfully extracting text from an image, the response looks like this:
{ "language": "en", "textAngle": 0, "orientation": "Up", ... }
To create a coherent string with the value of 'text' in each case, such as: 'Storehouse is always moving forward, and now this issue...
How can I achieve this in JavaScript? Accessing nested 'text' values using for and for-of loops has been challenging!
The API converts the JSON response to a string using:
JSON.stringify(data, null, 2);
Once the response is parsed as an array, further steps are unclear to me. Any guidance on how to proceed would be appreciated.
I have access to jQuery if needed.
Thank you!