Passing PayPal Buttons items object

I have a bit of a head scratcher, I’m trying to make a store that sells one thing in three sizes and pass the items to paypal for payment:

            let itemsArray = [];
            let pplrg = parseInt(document.getElementById('lrg').value);
            let ppsml = parseInt(document.getElementById('sml').value);
            let ppcld = parseInt(document.getElementById('cld').value);
            let ppvalue = 0;
            if(pplrg > 0) {
                itemsArray.push({"name": "Adult Large", "description": "Adult Large size", "unit_amount": { "currency_code": "AUD", "value": "25.95"}, "quantity": pplrg.toString()});
                ppvalue+= pplrg * 25.95
            }
            if(ppsml > 0) {
                itemsArray.push({"name": "Adult Small", "description": "Adult Small size", "unit_amount": { "currency_code": "AUD", "value": "25.95"}, "quantity": ppsml.toString()});
                ppvalue+= ppsml * 25.95
            }
            if(ppcld > 0) {
                itemsArray.push({"name": "Child", "description": "Child size", "unit_amount": { "currency_code": "AUD", "value": "24.95"}, "quantity": ppcld.toString()});
                ppvalue+= ppsml * 24.95
            }
            console.log(JSON.stringify(itemsArray));
            
            paypal.Buttons({
                createOrder: function(data, actions) {
                  return actions.order.create({
                     "purchase_units": [{
                        "amount": {
                          "currency_code": "AUD",
                          "value": ppvalue.toFixed(2),
                          "breakdown": {
                            "item_total": {
                              "currency_code": "AUD",
                              "value": ppvalue.toFixed(2)
                            }
                          }
                        },
                        "items": JSON.stringify(itemsArray)
                      }]
                  });
                },
                
                onApprove: function(data, actions) {
                  return actions.order.capture().then(function(orderData) {
                    // Successful capture! For dev/demo purposes:
                        console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));
                        let transaction = orderData.purchase_units[0].payments.captures[0];
                        let email = transaction.payer[0].email_address;
                        console.log(email);
                        alert('Transaction '+ transaction.status + ': ' + transaction.id + 'nnSee console for all available details');
                        
                    // When ready to go live, remove the alert and show a success message within this page. For example:
                    var element = document.getElementById('paypal-button-container');
                    element.innerHTML = '';
                    element.innerHTML = '<h3>Thank you for your payment!</h3>';
                    element.innerHTML+= '<p>Paypal should be sending you an receipt with details of your order to '+email+'.</p>';
                  });
                }
            }).render('#paypal-button-container');

This does not work, however, as you can see I console.log the contents of JSON.stringify(itemsArray) and if I replace JSON.stringify(itemsArray) in the paypal.Buttons with the contents of the console, it works fine. ie:

            let itemsArray = [];
            let pplrg = parseInt(document.getElementById('lrg').value);
            let ppsml = parseInt(document.getElementById('sml').value);
            let ppcld = parseInt(document.getElementById('cld').value);
            let ppvalue = 0;
            if(pplrg > 0) {
                itemsArray.push({"name": "Adult Large", "description": "Adult Large size", "unit_amount": { "currency_code": "AUD", "value": "25.95"}, "quantity": pplrg.toString()});
                ppvalue+= pplrg * 25.95
            }
            if(ppsml > 0) {
                itemsArray.push({"name": "Adult Small", "description": "Adult Small size", "unit_amount": { "currency_code": "AUD", "value": "25.95"}, "quantity": ppsml.toString()});
                ppvalue+= ppsml * 25.95
            }
            if(ppcld > 0) {
                itemsArray.push({"name": "Child", "description": "Child size", "unit_amount": { "currency_code": "AUD", "value": "24.95"}, "quantity": ppcld.toString()});
                ppvalue+= ppsml * 24.95
            }
            console.log(JSON.stringify(itemsArray));
            
            paypal.Buttons({
                createOrder: function(data, actions) {
                  return actions.order.create({
                     "purchase_units": [{
                        "amount": {
                          "currency_code": "AUD",
                          "value": ppvalue.toFixed(2),
                          "breakdown": {
                            "item_total": {
                              "currency_code": "AUD",
                              "value": ppvalue.toFixed(2)
                            }
                          }
                        },
                        "items": [{"name":"'Adult Large","description":"Adult Large size","unit_amount":{"currency_code":"AUD","value":"25.95"},"quantity":"1"},{"name":"Adult Small","description":"Adult Small size","unit_amount":{"currency_code":"AUD","value":"25.95"},"quantity":"1"}]
                      }]
                  });
                },
                
                onApprove: function(data, actions) {
                  return actions.order.capture().then(function(orderData) {
                    // Successful capture! For dev/demo purposes:
                        console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));
                        let transaction = orderData.purchase_units[0].payments.captures[0];
                        let email = transaction.payer[0].email_address;
                        console.log(email);
                        alert('Transaction '+ transaction.status + ': ' + transaction.id + 'nnSee console for all available details');
                        
                    // When ready to go live, remove the alert and show a success message within this page. For example:
                    var element = document.getElementById('paypal-button-container');
                    element.innerHTML = '';
                    element.innerHTML = '<h3>Thank you for your payment!</h3>';
                    element.innerHTML+= '<p>Paypal should be sending you an receipt with details of your order to '+email+'.</p>';
                  });
                }
            }).render('#paypal-button-container');

Which is what’s really confusing me, obviously I’ve constructed my itemsArray correctly and JSON.stringify(itemsArray) renders the text in the format PayPal is expecting, but, it doesn’t work, does anyone with a bit more experience be able to tell me what I’m doing wrong?

I’ve done a fair bit of searching on the issue and I know questions about this come up a bit but they all seem to be a fair bit different from the issue I’m having.

Answer

Simply

"items": itemsArray

There is no cause to stringify something that’s going to be assigned to a string value in an object that’s later going to be stringified again for transmission.