Using Datatables with a Stripe response not working
Using Datatables with a Stripe response not working
I am trying to return a Stripe response of charges for a customer into Datatables and for some reason it is not working. I have a Datatables debug page located at https://debug.datatables.net/itepiw. I am using the column.data function and the Stripe response has nested fields, so I am not sure that I have it setup just right. Here is my javascript point for the columns:
columns: [
{ data: ["amount"], title: 'Amount' },
{ data: ["created"], title: 'Date' },
{ data: ["paid"], title: 'Paid' },
{ data: ["source.brand"], title: 'Card' },
{ data: ["source.last4"], title: 'Last 4' },
{ data: ["status"], title: 'Status' }
],
Thank you in advance for any input on this.
This question has an accepted answers - jump to answer
Answers
columns.data
doesn't take an array, so that's not likely to be correct ('m not actually sure what DataTables will do with that!).Can you show me what the JSON is that you are attempting to use please.
Allan
Try using just
data: "amount"
, etc.Allan