-2
{  
   "status":"POST",
   "extrabed_cost":600,
   "grand_total":"24982.86",
   "total_tax":"3988.86"
}

Add this json datas in to table

2 Answers2

1

If I understood your purpose correctly, this fiddle can help you.

Create table dynamically

var objFromHttp = {
    "extrabed_cost": 600,
    "grand_total": "24982.86",
    "price_breakup": {
        "2017 - 10 - 23": 2599,
        "2017 - 10 - 25": 2599,
        "2017 - 10 - 24": 2599,
        "2017 - 10 - 27": 2599,
        "2017 - 10 - 26": 2599
    },
    "room_cost": 2299,
    "status": "POST",
    "tax_percent": 19,
    "total": 20994,
    "total_days": 8,
    "total_tax": "3988.86"
};

It's difficult to validate your json, so I cooked your json a little.

Is this what you want??

Canet Robern
  • 1,049
  • 2
  • 11
  • 28
0

This json is not a well formatted one. Beside this, if you are using java, you can deserialize it in an object, use a transformer to transfer it to an object(or more objects) that maps (use hibernate) to your database.