CloudKit JS query with filter by modified date

Hi,


I'd like to query records with filter on modication date, though I have no Idea how to build "filterBy" dictionary. "modified" field does not exists, nor "modificationDate". Any idea?

Replies

Let me be the first to say this is probably not safe to use. I could not find any documentation on it and figured it out by brute force. I imagine Apple will replace this with a proper and documented method at some point in the future... but for now I've been able to filter on modification date by:


var query = {
     recordType: 'RECORD_TYPE',
     filterBy: [{
          comparator: 'COMPARATOR_FOUND_IN_APPLE_DOCUMENTATION',
          fieldName: '___modTime',
          fieldValue: {
               value: 1462661116582 // Milliseconds since 1970/01/01 as Integer.
          }
     }]
};


Good luck.