Describe the issue/error/question
I have a list I need to create a JSON body from, for an HTTP POST
First few records:
[
{
"Account Type": "DebitNetPay",
"Account Description": "1210 - Bank - SHM",
"Debit": 0,
"Credit": 100.86
},
{
"Account Type": "DebitTax",
"Account Description": "1210 - Bank - SHM",
"Debit": 0,
"Credit": 35.85
},
{
"Account Type": "BenefitCompanyContribution",
"Account Description": "Employee Life Insurance - Benefit Company Contribution",
"Debit": 0.69,
"Credit": 0
}
]
The list is basically 4 columns, 20+ records
I am only getting record 1 in the body
{
"title": "Payroll Entry",
"company": "SHM",
"accounts": [
{
"account": "{{$json["Account Description"]}}",
"debit_in_account_currency": {{$json["Debit"]}},
"credit_in_account_currency": {{$json["Credit"]}}
}
],
"posting_date": "{{$node["Function"].json["posting_date"]}}",
"voucher_type": "Journal Entry",
"naming_series": "JV-"
}
I need all list items to be in the “accounts” array
I searched samples and posts but haven’t ended up with any more understanding.
Thanks,
Mike
Information on your n8n setup
- Running n8n via n8n.cloud