182
rated 0 times
[
185]
[
3]
/ answers: 1 / hits: 17075
/ 12 Years ago, sun, november 4, 2012, 12:00:00
I have an object like
{ status: success, auth: { code: 23123213, name: qwerty asdfgh } }
I want to convert it to dot notation (one level) version like:
{ status: success, auth.code: 23123213, auth.name: qwerty asdfgh }
Currently I am converting the object by hand using fields but I think there should be a better and more generic way to do this. Is there any?
Note: There are some examples showing the opposite way, but i couldn't find the exact method.
Note 2: I want it for to use with my serverside controller action binding.
More From » syntax