Hi @pastorsj!
I've pulled series data using the getObservationsForSeries method and I'm trying to use the filter method on data accessed via the observations property. A static type checking error is blocking me from transpiling.
The code I'm using is:
const series = await fred.series.getObservationsForSeries('SP500');
let data = series.observations.filter((obj: any) => {
// test implementation
});
And the error I'm getting is:
src/app.ts:31:36 - error TS2339: Property 'filter' does not exist on type 'ObservationSet'.
31 let data = series.observations.filter((obj: any) => {
~~~~~~
I double checked the wrapper documentation, and it does says that the returned JSON's observations property has a value of an array of objects, so it's odd that I'm not able to use an array method.
Would appreciate it if you looked into this! Thanks in advance.
Hi @pastorsj!
I've pulled series data using the
getObservationsForSeriesmethod and I'm trying to use thefiltermethod on data accessed via theobservationsproperty. A static type checking error is blocking me from transpiling.The code I'm using is:
And the error I'm getting is:
I double checked the wrapper documentation, and it does says that the returned JSON's
observationsproperty has a value of an array of objects, so it's odd that I'm not able to use an array method.Would appreciate it if you looked into this! Thanks in advance.