Answer the question
In order to leave comments, you need to log in
How to replace large letters in json with small letters?
Let's say we have this json:
{'Account': 'Vasja', 'Date': '02/10/2015', 'Id' : '78234324234'}
Answer the question
In order to leave comments, you need to log in
var jsoff = JSON.parse('{"Accoun":"Vasja","Date":"02/10/2015","Id":"78234324234"}'), jp = {};
for(var o in jsoff) jp[o.toLowerCase()] = jsoff[o];
console.log(jp);
Можно вот так:
var jsonObj = {'Account': 'Vasja', 'Date': '02/10/2015', 'Id' : '78234324234'};
var jsonString = JSON.stringify(jsonObj);
console.log(JSON.parse(jsonString.toLowerCase()));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question