Assuming that I trigger events on the following ref(\'/users/{userId}/items/{newItem}\') I want to get a value from inside the wildcard userId
ref(\'/users/{userId}/items/{newItem}\')
userId
In firestore you can use this.
exports.getUser = functions.firestore .document('users/{userId}').onWrite((change, context) => { let userId = context.params.userId; //... });