Here are the rules for a list of objects. If you are authenticated you can access everything. If not, some objects are public, some aren't (boolean public property). The rules bellow for the $object work fine if you try to access the object directly.
"list": {
  ".read": ???????????? ,
  ".write": "auth != null",
  "$object": {
    ".read": "auth != null || data.child('public').val() === true",
    ".write": "auth != null"
  }
}
But I also need rules to list ONLY the public objects if you are not authenticated. How can I set the read rules for a property of a generated $key inside its parent list? Something like:
"list":{
  ".read": "auth != null || data.child('$key').child('public').val() === true"
}