Replies: 2 comments
-
Já conseguiu? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Fabio!! não acabei usando outro artificio para obter as informações... acabei fazendo tudo em async/await joguei para uma array list e depois fiz um filter para encontrar quem eu precisava! acabei meio que abandonando a ideia... qual é a sua situação?? |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Olá rapaziada! tudo bem com voces? bem estou com esta situação no meu firebase, vou postar aqui minha estrutura de dados:
"users" : {
"VAFUHrhdMwWAq2thHN4lItz3Q6s1" : {
"id" : "VAFUHrhdMwWAq2thHN4lItz3Q6s1",
"name" : "Teste usuário 1",
"roler" : "users"
},
"XQjL0VzYDKV1lHGNyH0LwDWjUFq1" : {
"id" : "XQjL0VzYDKV1lHGNyH0LwDWjUFq1",
"name" : "Teste usuário 2",
"roler" : "users"
},
"qt1E5ftnOifqJWDEv6AYbvs5J6A3" : {
"id" : "qt1E5ftnOifqJWDEv6AYbvs5J6A3",
"name" : "Marcos RN",
"roler" : "shopkeeper"
},
"IB7HYbFoizWCtx90IWuKlX9R3Nk2" : {
"id" : "IB7HYbFoizWCtx90IWuKlX9R3Nk2",
"name" : "Rocketseat",
"roler" : "shopkeeper"
}
},
"usersShopKeeper" : {
"VAFUHrhdMwWAq2thHN4lItz3Q6s1" : {
"IB7HYbFoizWCtx90IWuKlX9R3Nk2" : {
"currentBonus" : 10,
"currentSeal" : 120,
"idShopKeeper" : "IB7HYbFoizWCtx90IWuKlX9R3Nk2",
"idUserShop" : "VAFUHrhdMwWAq2thHN4lItz3Q6s1_IB7HYbFoizWCtx90IWuKlX9R3Nk2",
"updateAt" : "10/05/2019 19:36:48"
},
"qt1E5ftnOifqJWDEv6AYbvs5J6A3" : {
"currentBonus" : 5,
"currentSeal" : 57,
"idShopKeeper" : "qt1E5ftnOifqJWDEv6AYbvs5J6A3",
"idUserShop" : "VAFUHrhdMwWAq2thHN4lItz3Q6s1_qt1E5ftnOifqJWDEv6AYbvs5J6A3",
"updateAt" : "10/05/2019 19:40:38"
}
},
"XQjL0VzYDKV1lHGNyH0LwDWjUFq1" : {
"IB7HYbFoizWCtx90IWuKlX9R3Nk2" : {
"currentBonus" : 10,
"currentSeal" : 120,
"idShopKeeper" : "IB7HYbFoizWCtx90IWuKlX9R3Nk2",
"idUserShop" : "XQjL0VzYDKV1lHGNyH0LwDWjUFq1_IB7HYbFoizWCtx90IWuKlX9R3Nk2",
"updateAt" : "10/05/2019 20:16:48"
}
}
}
o que pretendo fazer? juntas as informações das duas estruturas pelo ID do usuário que também é a KEY de cada item... estou usando esse código aqui:
o código acima funciona, porem ao popular meu state no react-native, ele informa que tem 0 elementos no objeto. Alguém pode dar uma ajuda ou dizer o que estou fazendo de errado??
Beta Was this translation helpful? Give feedback.
All reactions