Hi,
I have a projection to generate state as follows:
fromStream(‘wilbur-departures’).when({
$init: (state) => {
return {
departures: {},
sequenceNumber: 0
};
},
'flightUpdated': (state, event) => {
state.departures[event.data.flightNumber] = event.data;
state.sequenceNumber = event.sequenceNumber;
}
}).transformBy(state => {
const result = {
sequenceNumber:state.sequenceNumber,
departures:[],
};
Object.keys(state.departures).forEach((key) => {
const departure = state.departures[key];
result.departures.push(departure);
});
return result;
});
``
I would like to access another streams metadate to add some more info to the projection result.
Is this at all possible?
Thanks in advance, Arjen