How can I recursive query key with re-base?
I have the follow structure..
comments/{ROOM_ID}: {
{COMMENT_ID}: {
<COMMENT_DATA>
comments: {
<OTHERS_REPLIED_COMMENTS>
}
}
}
And I want to push new replied comment ... I tried:
export async function addReplyComment(roomId, parentCommentKey, data) {
const parentComment = await base.fetch(`comments/${roomId}`, {
asArray: true,
queries: {
equalTo: parentCommentKey,
orderByKey: 'comments', // 'RIGHT? OR MAYBE orderByChild ?',
},
});
return base.push(`${parentComment.<FULL_PATH_HERE, HOW?>}/comments`, {
data,
});
}