SwiftyJSON
SwiftyJSON copied to clipboard
snapshot value order is changed by SwiftyJSON
pathref.queryOrderedByKey().queryStarting(atValue: fromItemKey).queryLimited(toFirst: UInt(paginationCount)).observe(.value, with: { (snapshot) in {
print(" json obj=====",snapshot.value )
// all order is correct
let jsonData = try JSONSerialization.data(withJSONObject: bizOfferingsSnapshot.value as Any, options: .prettyPrinted)
let offeringJson = try JSON(data: jsonData)
// here order is changed
print(" json obj=====",offeringJson )
}
https://stackoverflow.com/questions/56164774/snapshot-value-order-is-changed-by-swiftyjson