I'm working on an iOS workout split app with firebase RT database as the backend. At the moment, I'm storing the data on all the workouts like this is firebase:
{
"DuGjwAxKwScYFiWK4xx1IsATfsC2" : {
"splits" : {
"Test-Split" : {
"day 1" : {
"-MhjCRcr8Wv7HrIF8Ico" : {
"Exercise Name" : "Curls",
"Is Timed" : false,
"Reps or Secs" : "12",
"Sets" : "4"
},
}
},
"Test-Split-2" : {
"day 1" : {
"-MhjC_FAIrYLD907KmXY" : {
"Exercise Name" : "Squats",
"Is Timed" : false,
"Reps or Secs" : "12",
"Sets" : "4"
}
}
}
}
},
What I'm looking to do at the moment is pull just the names of the splits, so that a user can select which split they want to run. In the above example, the split names are Test-Split and Test-Split-2. The trouble is, they don't have any kind of key associated with them. I can pull a snapshot that will give me all the data downstream of "splits", but how do I just pull the split names?
Thanks!