How can I set a one to many relationship using prepare_save_data?

When creating a custom code studio widget I can make this widget create a relationship to the in context record on form submission by making my prepare_save_data function return something of the form:

{ Relation_Path:Id: Id }

This works for a one to one or many to one relationship path. How can I create one to many relationships using the prepare_save_data?

I’ve tried just passing the same as above, or exchanging the Id for an array of Ids, but either way I get a warning as below:


What’s the correct format to pass this information in?