Get the specified element in the array
P粉191323236
2023-08-17 11:20:25
<p>I get the output of <strong>[Document<Recording<string, any>>, number][]</strong>
Each element is described below: </p>
<pre class="brush:php;toolbar:false;">[
Document{
page: 'I worked at ABC Company',
meta: { id: emloyee-111, name: 'John"}
},
245
]
[
Document{
page: 'I am a software developer',
meta: { id: emloyee-444, name: 'Marry"}
},
789
]
for (employee of employees) {
// Get id
// get name
// Get the numbers 245, 789
}</pre>
<p>In typescript (or javasSript), how to get the numbers (245, 789) of two employees and their id and name. </p>
Just loop through the output
Or if you want to get data from an array of employees: