I'm trying to write function in C# that will converts JSON to a key/value pairs. It should support arrays. So for example the following JSON:
{ 
    title: title_value,
    components: [
        {
            component_id: id1,
            menu: [
                   {title: menu_title1},
                   {title: menu_title_x},
                   {id: menu_id1}    
            ]
        },
        {
             component_id: id2,
             menu: [
                   {title: menu_title2},
                   {id: menu_id2}    
             ]
        }
    ]
}
should be converted to:
Is it any simple way to do this task? The logic becomes complicated when I start taking into account arrays and nested arrays.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With