javascript - How to convert uppercase format to camel case format
为情所困2017-05-19 10:46:43
0
2
606
For example: [{CARID:'111',CARNO:'1111'},{CARID:'222',CARNO:'2222'},{CARID:'333',CARNO:'3333'}] Is there any general method to convert it into: [{carId:'111',carNo:'1111'},{carId:'222',carNo:'2222'},{carId:'333',carNo:' 3333'}]
It’s actually very troublesome. You first need to have a dictionary with all the words in it, and then separate the key names into individual words according to the dictionary and then convert them into camel case format and then combine them.
If this topic is limited to the DEMO you provided and interpreted with a general method:
It will be difficult to exceed it any further.
It’s actually very troublesome. You first need to have a dictionary with all the words in it, and then separate the key names into individual words according to the dictionary and then convert them into camel case format and then combine them.
You can imagine how troublesome this is.