I have a series of checkboxes setup in Vue.js components that are emitting data to my parent element. I want to watch this data for changes and append the data within the object to an API call, in order to filter data.
Here's what my data on the parent element looks like when some items are checked (otherwise it's just an empty object if nothing's checked):
I want to be able to insert this data into an API call that would (in general) look like this, when the data changes:
this.axios.get('http://localhost:8000/api/v1/schools' +
for (feature in selectedFeatures) {
'?features[]=' + feature
}
).then((response) => {
this.$root.$emit('searchQuery', response.data);
});
Usually this is pretty easy with the Watch feature of Vue, but since my data is nested in unnamed arrays and generated dynamically, I'm not sure how to do this.

for-loopis being concatenated to a string? Please post the code for the components.