vue-search-select icon indicating copy to clipboard operation
vue-search-select copied to clipboard

how do i use data from getJSON()?

Open sherwinmartin opened this issue 6 years ago • 0 comments

i'm trying to figure out how to use an endpoint data to populate the dropdown. i have the following code

mounted () { $.getJSON('/occupations/search-select', json => { this.occupations = json.data console.log(json.data) } }

how should my data() look like? i'm not that great with front end stuff but i'm trying. is this the correct approach or is there another way to do it? thanks.

sherwinmartin avatar Mar 06 '19 00:03 sherwinmartin