# Cannot send Array of Objects as a value for a custom event property

**URL:** <https://community.hubspot.com/t/cannot-send-array-of-objects-as-a-value-for-a-custom-event-property/65794>\
**Category:** APIs & Integrations\
**Tags:** events\
**Created:** [September 23, 2022, 5:42pm UTC](https://community.hubspot.com/t/cannot-send-array-of-objects-as-a-value-for-a-custom-event-property/65794 "2022-09-23T17:42:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EPlaza](https://avatars.discourse-cdn.com/v4/letter/e/58956e/32.png) [@EPlaza](https://community.hubspot.com/u/EPlaza)\
**Post date:** [September 23, 2022, 5:42pm UTC](https://community.hubspot.com/t/cannot-send-array-of-objects-as-a-value-for-a-custom-event-property/65794/1 "2022-09-23T17:42:45Z")

</div>

hello, I’m trying to send an array of objects as a value for an event property but I keep getting an error  
“message”: “Invalid input JSON on line 1, column 120: Cannot deserialize value of type `java.lang.String` from Array value (token `JsonToken.START_ARRAY`)”,  
this is what i am sending

{

properties:{

checkout\_id: ‘checkoutid’,

total: 129990,

products: [

{

value1: 1,

value2: “value2”,

price: 0,

},

{

value1: 1389368,

value2: “value2”,

price: 40000,

},

{

value1: 1389369,

value2: “value2”,

price: 40000,

},

{

value1: 1389375,

value2: “value2”,

price: 0,

},

{

value1: 1389381,

value2: “value2”,

price: 49990,

}

],

email: “[random.email@gmail.com](mailto:random.email@gmail.com)”

},

eventName: " pe21569360\_order\_completed"

email: “[random.email@gmail.com](mailto:random.email@gmail.com)”

}

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 26, 2022, 4:19pm UTC](https://community.hubspot.com/t/cannot-send-array-of-objects-as-a-value-for-a-custom-event-property/65794/2 "2022-09-26T16:19:57Z")

</div>

Hi, @EPlaza 👋 Thanks for reaching out and including those details. Hey, @Teun @miljkovicmisa, do you have any experience or troubleshooting tips you can share here? Thank you for taking a look! — Jaycee

---

<div class="post-metadata">

**Author:** ![miljkovicmisa](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/miljkovicmisa/32/86357_2.png) [@miljkovicmisa](https://community.hubspot.com/u/miljkovicmisa)\
**Post date:** [September 26, 2022, 4:33pm UTC](https://community.hubspot.com/t/cannot-send-array-of-objects-as-a-value-for-a-custom-event-property/65794/3 "2022-09-26T16:33:22Z")

</div>

Hello @EPlaza , hi [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) !  
Seems like the json object is not formatted properly, try to stick with the double quotes arount keys and values (is strings) and pay attention to your commas.  
Here is the corrected partial version of your object as it should be formatted:

```lia-code-sample
{
	"properties": {
		"checkout_id": 12,
		"total": 129990,
		"products": [{
				"value1": 1,
				"value2": "value2",
				"price": 0
			},
			{
				"value1": 1389368,
				"value2": "value2",
				"price": 40000
			}
		],
		"email": "random.email@gmail.com"
	},
	"eventName": " pe21569360_order_completed",
	"email": "random.email@gmail.com"
}

```

Hope this helps you resolve your issue, also a helpful tool in those situations is a _ **json formatter** _, because it helps you with debugging the json object. I won’t suggest one here but if you do search the google you should find plenty of those.

_ **If my answer was helpful please mark it as a solution.** _
