-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
@djhvscf: I forked this repository and was going to create some PRs. Didn't want to get to far if this is something that you are working on -or did't want in the extension.
I don't have any working code yet, but the function would reverse the results of flatJSON, to the data's native JSON format.
$.fn.bootstrapTable.methods.push('expandJSON');Usage:
// On Array of Objects
$('#table').bootstrapTable('expandJSON', [
{
"user.name": "jtrumbull",
"user.mood": "bored",
"user.array.0.key1": "a"
"user.array.1.key1": "b"
"user.array.3.key1": "c"
},
{...},
{...}
]);
// or on single Object
$('#table').bootstrapTable('expandJSON', {...});Would produce:
[
{
"user": {
"name": "jtrumbull",
"mood": "bored",
"array": [
{ "key1": "a" },
{ "key1": "b" },
{ "key1": "c" }
]
}
},
{...},
{...}
]Metadata
Metadata
Assignees
Labels
No labels