Click here to Skip to main content
15,883,623 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a user profile card that displays different measurements in boxes, such as temperature, volume and weight.

Currently I’m getting the name of each user from an axios GET request, I need to then take the profile ID in that data and perform another GET request with the ID which gives me a performance data, in that data I am given a performance ID which I need to use to GET a final array of measurement data.

But I’m wondering how I can take the data of the measurements and display in each user profile(that has measurement data) for each measurement box?
For example lets say I have 3 objects of profile details and 2 of measurement data, how can I show the measurement data with performance ID 2 to profile ID 3?

I made a small working project Here
In this example the final axios request in the created hook of Profile.vue
JavaScript
console.log('final data',response.data)
displays the data I need to display in the template.

Thanks so much!

What I have tried:

I've tried saving the final data into the Profile array containing the objects of the names and doing something like this:
{{ item.id == idNums.profile_id ? idNums.data[1].data: "" }}

So if the profile Id in profile data = the profile Id in measurement data(that I saved to the profile array) it should display but it didn't properly work and there was a huge data lag.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900