You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a list of user details in that each user object have list of family members , I want to download user details along with family member details , but in excel I am getting family member details as [object] [object][object] I tried MATRIX but am getting same result ,Is there any possibilities to format like below
.username1, mobile , mail , address,age,gender, number of family members
member1_name , member1_age,member1_gender
member2_name.member2_age,member2_gender_
.username2, mobile , mail , address,age,gender, number of family members
member1_name , member1_age,member1_gender
.xlsx or any other report format is fine..
To extract data from nested objects you need to use SEARCH statement. In your case it shoul be something like:
varres=alasql("SEARCH / AS @user Members / AS @member \ RETURN(@user->Id AS UserId, @user->Name AS UserName, \ @member->Name AS MemberName, @member->Age AS MemberAge) \ INTO XLSX('member_Track.xlsx',{headers:true,sheetid:'member_Track'}) \ FROM $0 ",[users]);
You need to modify RETURN(...) clause to include all fields you need.
Hi,
I have a list of user details in that each user object have list of family members , I want to download user details along with family member details , but in excel I am getting family member details as [object] [object][object] I tried MATRIX but am getting same result ,Is there any possibilities to format like below
.username1, mobile , mail , address,age,gender, number of family members
member1_name , member1_age,member1_gender
member2_name.member2_age,member2_gender_
.username2, mobile , mail , address,age,gender, number of family members
member1_name , member1_age,member1_gender
.xlsx or any other report format is fine..
here is my jsfiddle link https://jsfiddle.net/x0foycyq/
Please suggest.
The text was updated successfully, but these errors were encountered: