Split items into objects to use Google Translate node and return the .json file to its original format

Hi @dcbn,

Do you mean when we have an array with repeating objects (“name”, “date” etc.)?

Yeah, so from looking at the example dataset you have provided ({ "Share": "Compartilhar", "Choose_option": "Escolha uma opção", "Get_content_fail": "" }) I can see three fields, but I am not sure if these are the only fields your actual JSON data will have. If so, you can ignore the conversion parts of my example workflow and simply use expressions to reference these fields.

Thank you for explaining, It makes sense even that I have to improve my javascript knowledge to better understand it.

Again, if you know the possible field names there’s no need to even think about this. I was just reading “json file with more than four hundred strings” and thinking these could be in >400 different fields with potentially unknown names.

The only Google API I could find was “Cloud Translation API” and the price seems expensive for my usage.

As for translation services, I have tried out the Bing/Azure translation for another request here on the forum. I don’t know the pricing details, but I could at least try it out for free and it worked with n8n. So perhaps you might want to check out the thread over here for details :slight_smile: