Is paging is possible in below rype json data??? Please suggest me.....
Is paging is possible in below rype json data??? Please suggest me.....
[{"HOTEL_PICTURE":"http://www.travco.co.uk/images/hotels/GJF/GJF_FRONT.jpg","HOTEL_NAME":"Hotel Golf","HOTEL_STAR":"4 Star","HOTEL_ADDRESS":"Plzenska 103/215A","Overview":"Hotel Golf is a modern 4-star hotel offering comfortable accommodation in west Prague. Highlights in.....","RoomData":
[{"ROOM_NAME":"Twin Room - With Breakfast","ROOM_PAX":"2","TOTAL_ADULT_PRICE":"132.00"},{"ROOM_NAME":"Double Room - With Breakfast","ROOM_PAX":"2","TOTAL_ADULT_PRICE":"132.00"}]}
This question has an accepted answers - jump to answer
Answers
[{
"HOTEL_PICTURE": "http://www.travco.co.uk/images/hotels/GJF/GJF_FRONT.jpg",
"HOTEL_NAME": "Hotel Golf",
"HOTEL_STAR": "4 Star",
"HOTEL_ADDRESS": "Plzenska 103/215A",
"Overview": "Hotel Golf is a modern 4-star hotel offering comfortable accommodation in west Prague. Highlights in.....",
"RoomData": [{
"ROOM_NAME": "Twin Room - With Breakfast",
"ROOM_PAX": "2",
"TOTAL_ADULT_PRICE": "132.00"
}, {
"ROOM_NAME": "Double Room - With Breakfast",
"ROOM_PAX": "2",
"TOTAL_ADULT_PRICE": "132.00"
}]
}]
Looks like it should be perfectly possible to me. Please link to a test case showing what you have tried so far (per the forum rules).
Also the data manual page might be of some use to you.
Allan
Hi Allan,
Provided link is very helpful for me but my problem is mentioned json is nested object form.
Please look again the json data object.
vsverma
I see it, but I don't know what you want. Do you want each row in the table to be based on
RoomData
, or something else?Yes i want data of HOTEL_PICTURE.,HOTEL_NAME.HOTEL_STAR. ,HOTEL_ADDRESS., Overview as a parent table and RoomData. as child table.
DataTables doesn't have built in support for child tables. However, you could implement it using the
row().child()
method if you wish.Allan
Ok thanks for your valuable feedback