Replies: 1 comment
-
OK, I finally got this by: classSchedule = toRaw(isRef(classSchedule)? classSchedule.value : classSchedule).body; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I cannot find any examples online for reading
.csv
data with thequerryContent
approach, so I'll just ask here.When reading a file that contains several column of data, I can do:
where
schedule
is a folder under/content
I have several files inside, namely
2022.csv
,2023.csv
etc, showing the schedule for each year.With the code above, I get the
classSchedule
Proxy, where I can getclassSchedule.value
.But in order to show it in a table with
ag-grid
, I want to get the nested array, instead of the whole csv data as one item of the array.If you look at the data structure below:
![image](https://private-user-images.githubusercontent.com/1921878/264402906-10185a09-3b68-414a-af28-aa7a3df39495.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4MTcyMTIsIm5iZiI6MTczOTgxNjkxMiwicGF0aCI6Ii8xOTIxODc4LzI2NDQwMjkwNi0xMDE4NWEwOS0zYjY4LTQxNGEtYWYyOC1hYTdhM2RmMzk0OTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTdUMTgyODMyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YjZjNTdiMWIxMmQ5NDM4MjRhM2Q2NWJhOTk0NTRlYWY3OGIzM2ZiZDQxOGYwYzg4ZTVkNmVkNWYwODViYTJmZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.aHITpVTrb29Z64YUO3LgAJMYw_hzqDql8YIFeHVl6T4)
The second arrow points to a manually defined
ref
:For the
Proxy
where the first arrow pointed to, I want thebody
(Array(10)
).How can I get that?
More reference of Ag-grid + Vue: https://www.ag-grid.com/vue-data-grid/getting-started/
Beta Was this translation helpful? Give feedback.
All reactions