Answer the question
In order to leave comments, you need to log in
How to iterate over an object and change certain values?
Good day! There is an object with some data. For example:
const data = {
title: 'title',
description: 'description',
address: {
city: 'city',
street: 'street',
},
};
const translation = {
title_en: 'title_en',
title_fr: 'title_fr',
city_en: 'city_en',
city_fr: 'city_fr',
description_en: 'description_en',
description_fr: 'description_fr',
};
const data_french = {
title: 'title_fr',
description: 'description_fr',
address: {
city: 'city_fr',
street: 'street',
},
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question