Answers for "dynamic json"

C#
1

newtonsoft create dynamic object

dynamic d = Newtonsoft.Json.Linq.JObject.Parse("{number:1000, str:'string', array: [1,2,3,4,5,6]}");
Posted by: Guest on March-18-2020
0

how to create dynamic json?

function createJSON() {
    jsonObj = [];
    $("input[class=email]").each(function() {

        var id = $(this).attr("title");
        var email = $(this).val();

        item = {}
        item ["title"] = id;
        item ["email"] = email;

        jsonObj.push(item);
    });

    console.log(jsonObj);
}
Posted by: Guest on July-15-2020

C# Answers by Framework

Browse Popular Code Answers by Language