角度:返回符合特定条件的对象

时间:2019-06-11 13:06:55

标签: angular

我正在尝试过滤出包含investmentstatusId = 1的对象。主要对象AllTerms是一个数组,其中每个元素包含两个子对象LegalFundClassCommercialViewModelLegalFundClassSideLetterViewModel。我正在寻找结果AllTerms对象,其中包含符合条件的LegalFundClassCommercialViewModelLegalFundClassSideLetterViewModel

我已经尝试过了,但是它没有返回任何行

this.TermDetails.LegalFundClassViewModel.AllTerms = this.TermDetails
      .LegalFundClassViewModel
      .AllTerms
      .filter(obj => obj.InvestmentStatusId === 1);

JSON

[{"LegalFundClassCommercialViewModel":{
"Description":"Class B",
"AuditSummary":"skeeling Jun 11, 2018",
"FeesReviewSummary":"",
"TermsReviewSummary":"",
"Id":11166,"FundId":5508,
"FundClassType":1,
"CurrencyId":null,
"PrimaryCurrencyName":null,
"OtherCurrencyName":[],"ManagerStrategyId":null,"ManagerStrategyName":null,"SubVotingId":null,"SubVotingName":null,"SubHotIssueId":null,"SubHotIssueName":null,"RedsFrqncyId":5,"RedsFrqncyName":"Quarterly","RedsNoticeDays":45,"NoticeTypeOfDaysId":2,"NoticeTypeOfDaysName":"Calendar","LockupTypeId":null,"LockupTypeName":null,"HardDurationMonthsId":null,"HardDurationMonthsName":null,"SoftDurationMonthsId":null,"SoftDurationMonthsName":null,"LockupFees0To12Pct":3,"LockupFees12To24Pct":null,"LockupFees24To36Pct":null,"WebfolioRedsFee":"12 M,0.03|","LockupComments":null,"ApplyGateDecliningBalance":false,"GateInvestorPct":null,"GateSourceId":null,"GateSourceName":null,"GateFundClassPct":null,"IntialProceeds":null,"PaymentInDays":null,"PaymentTypeOfDaysId":null,"PaymentTypeOfDaysName":null,"HoldbackPercentage":null,"HoldbackPayment":null,"HoldbackTypeOfDaysId":null,"HoldbackTypeOfDaysName":null,"ManagementFeeRate":null,"IncentiveFeeRate":null,"RealizationFrequencyId":null,"RealizationFrequencyName":null,"HighWaterMarkId":null,"HighWaterMarkName":null,"HurdleRate":false,"HurdleRateBasisId":null,"HurdleRateBasisName":null,"HurdleRatePct":null,"HurdleRateIndexId":null,"HurdleRateIndexName":null,"PreferredReturnRatePct":null,"GpCatchUp":null,"PreferredReturnComments":null,"Clawback":false,"ClawbackPercentage":null,"AssetFeeDiscountTypeId":null,"AssetFeeDiscountTypeName":null,"FeeComments":null,"FeeReductionsNegotiated":null,"InvestmentStatusId":0,"LegalParentClassId":null},"LegalFundClassSideLetterViewModel":null},{"LegalFundClassCommercialViewModel":{"Description":"Class A","AuditSummary":"skeeling Jun 11, 2018","FeesReviewSummary":"","TermsReviewSummary":"","Id":11167,"FundId":5508,"FundClassType":1,"CurrencyId":null,"PrimaryCurrencyName":null,"OtherCurrencyName":[],"ManagerStrategyId":null,"ManagerStrategyName":null,"SubVotingId":null,"SubVotingName":null,"SubHotIssueId":null,"SubHotIssueName":null,"RedsFrqncyId":5,"RedsFrqncyName":"Quarterly","RedsNoticeDays":45,"NoticeTypeOfDaysId":2,"NoticeTypeOfDaysName":"Calendar","LockupTypeId":null,"LockupTypeName":null,"HardDurationMonthsId":null,"HardDurationMonthsName":null,"SoftDurationMonthsId":null,"SoftDurationMonthsName":null,"LockupFees0To12Pct":3,"LockupFees12To24Pct":null,"LockupFees24To36Pct":null,"WebfolioRedsFee":"12 M,0.03|","LockupComments":null,"ApplyGateDecliningBalance":false,"GateInvestorPct":null,"GateSourceId":null,"GateSourceName":null,"GateFundClassPct":null,"IntialProceeds":null,"PaymentInDays":null,"PaymentTypeOfDaysId":null,"PaymentTypeOfDaysName":null,"HoldbackPercentage":null,"HoldbackPayment":null,"HoldbackTypeOfDaysId":null,"HoldbackTypeOfDaysName":null,"ManagementFeeRate":null,"IncentiveFeeRate":null,"RealizationFrequencyId":null,"RealizationFrequencyName":null,"HighWaterMarkId":null,"HighWaterMarkName":null,"HurdleRate":false,"HurdleRateBasisId":null,"HurdleRateBasisName":null,"HurdleRatePct":null,"HurdleRateIndexId":null,"HurdleRateIndexName":null,"PreferredReturnRatePct":null,"GpCatchUp":null,"PreferredReturnComments":null,"Clawback":false,"ClawbackPercentage":null,"AssetFeeDiscountTypeId":null,"AssetFeeDiscountTypeName":null,"FeeComments":null,"FeeReductionsNegotiated":null,"InvestmentStatusId":0,"LegalParentClassId":null},"LegalFundClassSideLetterViewModel":null},{"LegalFundClassCommercialViewModel":{"Description":"Class A","AuditSummary":"rmenon Jun 10, 2019","FeesReviewSummary":"dmukerji May 28, 2019","TermsReviewSummary":"kweigand Jan 16, 2019","Id":13713,"FundId":237146,"FundClassType":3,"CurrencyId":19,"PrimaryCurrencyName":"BRL","OtherCurrencyName":[10,19,7],"ManagerStrategyId":5508,"ManagerStrategyName":"Sylebra ","SubVotingId":null,"SubVotingName":null,"SubHotIssueId":null,"SubHotIssueName":null,"RedsFrqncyId":5,"RedsFrqncyName":"Quarterly","RedsNoticeDays":46,"NoticeTypeOfDaysId":2,"NoticeTypeOfDaysName":"Calendar","LockupTypeId":5,"LockupTypeName":"No Lock","HardDurationMonthsId":2,"HardDurationMonthsName":"3","SoftDurationMonthsId":3,"SoftDurationMonthsName":"6","LockupFees0To12Pct":2,"LockupFees12To24Pct":2,"LockupFees24To36Pct":0,"WebfolioRedsFee":null,"LockupComments":"In the SOT, there is a 1-year lock, this is no longer applicable and was only applicable for the original transfer from Sylebra commingled.","ApplyGateDecliningBalance":true,"GateInvestorPct":3,"GateSourceId":1,"GateSourceName":"Fund Gate","GateFundClassPct":3,"IntialProceeds":100,"PaymentInDays":30,"PaymentTypeOfDaysId":2,"PaymentTypeOfDaysName":"Calendar","HoldbackPercentage":0,"HoldbackPayment":2,"HoldbackTypeOfDaysId":1,"HoldbackTypeOfDaysName":"Business","ManagementFeeRate":0,"IncentiveFeeRate":30,"RealizationFrequencyId":7,"RealizationFrequencyName":"Yearly","HighWaterMarkId":1,"HighWaterMarkName":"Standard","HurdleRate":false,"HurdleRateBasisId":null,"HurdleRateBasisName":null,"HurdleRatePct":null,"HurdleRateIndexId":null,"HurdleRateIndexName":null,"PreferredReturnRatePct":0,"GpCatchUp":"test","PreferredReturnComments":null,"Clawback":false,"ClawbackPercentage":null,"AssetFeeDiscountTypeId":1,"AssetFeeDiscountTypeName":"Management Fee","FeeComments":"New fees effective 1/1/2019 \n\nManagement fee is an Asset Based fee of the lesser of $1M or 1.5% of NAV.  This is a payment in advance of any performance fee, making the management fee effectively zero.\n\nIncentive fee is 30% on first 15% of performance, 35% thereafter.\n\nAudit holdbacks should be zero unless the vehicle is in liquidation, in which case it's typically a 5% holdback paid once the audit is completed where applicable or 2-3 months after the final NAV once all the expenses have been paid.","FeeReductionsNegotiated":null,"InvestmentStatusId":1,"LegalParentClassId":null},"LegalFundClassSideLetterViewModel":{"Description":"Class A","AuditSummary":"rmenon Jun 10, 2019","FeesReviewSummary":"dmukerji May 28, 2019","TermsReviewSummary":"kweigand Jan 16, 2019","Id":28465,"FundId":237146,"FundClassType":4,"CurrencyId":7,"PrimaryCurrencyName":"AUD","OtherCurrencyName":[],"ManagerStrategyId":5508,"ManagerStrategyName":"Sylebra ","SubVotingId":null,"SubVotingName":null,"SubHotIssueId":null,"SubHotIssueName":null,"RedsFrqncyId":2,"RedsFrqncyName":"Weekly","RedsNoticeDays":46,"NoticeTypeOfDaysId":2,"NoticeTypeOfDaysName":"Calendar","LockupTypeId":5,"LockupTypeName":"No Lock","HardDurationMonthsId":2,"HardDurationMonthsName":"3","SoftDurationMonthsId":3,"SoftDurationMonthsName":"6","LockupFees0To12Pct":2,"LockupFees12To24Pct":2,"LockupFees24To36Pct":0,"WebfolioRedsFee":null,"LockupComments":"In the SOT, there is a 1-year lock, this is no longer applicable and was only applicable for the original transfer from Sylebra commingled.","ApplyGateDecliningBalance":true,"GateInvestorPct":3,"GateSourceId":1,"GateSourceName":"Fund Gate","GateFundClassPct":3,"IntialProceeds":100,"PaymentInDays":30,"PaymentTypeOfDaysId":2,"PaymentTypeOfDaysName":"Calendar","HoldbackPercentage":0,"HoldbackPayment":2,"HoldbackTypeOfDaysId":1,"HoldbackTypeOfDaysName":"Business","ManagementFeeRate":0,"IncentiveFeeRate":30,"RealizationFrequencyId":7,"RealizationFrequencyName":"Yearly","HighWaterMarkId":1,"HighWaterMarkName":"Standard","HurdleRate":false,"HurdleRateBasisId":null,"HurdleRateBasisName":null,"HurdleRatePct":null,"HurdleRateIndexId":null,"HurdleRateIndexName":null,"PreferredReturnRatePct":0,"GpCatchUp":"test","PreferredReturnComments":null,"Clawback":false,"ClawbackPercentage":null,"AssetFeeDiscountTypeId":1,"AssetFeeDiscountTypeName":"Management Fee","FeeComments":"New fees effective 1/1/2019 \n\nManagement fee is an Asset Based fee of the lesser of $1M or 1.5% of NAV.  This is a payment in advance of any performance fee, making the management fee effectively zero.\n\nIncentive fee is 30% on first 15% of performance, 35% thereafter.\n\nAudit holdbacks should be zero unless the vehicle is in liquidation, in which case it's typically a 5% holdback paid once the audit is completed where applicable or 2-3 months after the final NAV once all the expenses have been paid.","FeeReductionsNegotiated":null,"InvestmentStatusId":1,"LegalParentClassId":13713}},{"LegalFundClassCommercialViewModel":{"Description":"Class D","AuditSummary":" ","FeesReviewSummary":"","TermsReviewSummary":"","Id":13714,"FundId":237146,"FundClassType":3,"CurrencyId":null,"PrimaryCurrencyName":null,"OtherCurrencyName":[],"ManagerStrategyId":null,"ManagerStrategyName":null,"SubVotingId":null,"SubVotingName":null,"SubHotIssueId":null,"SubHotIssueName":null,"RedsFrqncyId":5,"RedsFrqncyName":"Quarterly","RedsNoticeDays":45,"NoticeTypeOfDaysId":2,"NoticeTypeOfDaysName":"Calendar","LockupTypeId":null,"LockupTypeName":null,"HardDurationMonthsId":null,"HardDurationMonthsName":null,"SoftDurationMonthsId":null,"SoftDurationMonthsName":null,"LockupFees0To12Pct":null,"LockupFees12To24Pct":null,"LockupFees24To36Pct":null,"WebfolioRedsFee":null,"LockupComments":null,"ApplyGateDecliningBalance":false,"GateInvestorPct":null,"GateSourceId":null,"GateSourceName":null,"GateFundClassPct":null,"IntialProceeds":null,"PaymentInDays":null,"PaymentTypeOfDaysId":null,"PaymentTypeOfDaysName":null,"HoldbackPercentage":null,"HoldbackPayment":null,"HoldbackTypeOfDaysId":null,"HoldbackTypeOfDaysName":null,"ManagementFeeRate":null,"IncentiveFeeRate":null,"RealizationFrequencyId":null,"RealizationFrequencyName":null,"HighWaterMarkId":null,"HighWaterMarkName":null,"HurdleRate":false,"HurdleRateBasisId":null,"HurdleRateBasisName":null,"HurdleRatePct":null,"HurdleRateIndexId":null,"HurdleRateIndexName":null,"PreferredReturnRatePct":null,"GpCatchUp":null,"PreferredReturnComments":null,"Clawback":false,"ClawbackPercentage":null,"AssetFeeDiscountTypeId":null,"AssetFeeDiscountTypeName":null,"FeeComments":null,"FeeReductionsNegotiated":null,"InvestmentStatusId":0,"LegalParentClassId":null},"LegalFundClassSideLetterViewModel":null},{"LegalFundClassCommercialViewModel":{"Description":"Class C","AuditSummary":"kweigand Feb 19, 2019","FeesReviewSummary":"kweigand Feb 19, 2019","TermsReviewSummary":"fblack Nov 21, 2018","Id":13715,"FundId":237146,"FundClassType":3,"CurrencyId":null,"PrimaryCurrencyName":null,"OtherCurrencyName":[],"ManagerStrategyId":null,"ManagerStrategyName":null,"SubVotingId":null,"SubVotingName":null,"SubHotIssueId":null,"SubHotIssueName":null,"RedsFrqncyId":5,"RedsFrqncyName":"Quarterly","RedsNoticeDays":46,"NoticeTypeOfDaysId":2,"NoticeTypeOfDaysName":"Calendar","LockupTypeId":5,"LockupTypeName":"No Lock","HardDurationMonthsId":null,"HardDurationMonthsName":null,"SoftDurationMonthsId":null,"SoftDurationMonthsName":null,"LockupFees0To12Pct":0,"LockupFees12To24Pct":0,"LockupFees24To36Pct":0,"WebfolioRedsFee":null,"LockupComments":"In the SOT, there is a 1-year lock, this is no longer applicable and was only applicable for the original transfer from Sylebra commingled.","ApplyGateDecliningBalance":false,"GateInvestorPct":0,"GateSourceId":null,"GateSourceName":null,"GateFundClassPct":0,"IntialProceeds":100,"PaymentInDays":30,"PaymentTypeOfDaysId":2,"PaymentTypeOfDaysName":"Calendar","HoldbackPercentage":0,"HoldbackPayment":null,"HoldbackTypeOfDaysId":null,"HoldbackTypeOfDaysName":null,"ManagementFeeRate":0,"IncentiveFeeRate":30,"RealizationFrequencyId":7,"RealizationFrequencyName":"Yearly","HighWaterMarkId":1,"HighWaterMarkName":"Standard","HurdleRate":false,"HurdleRateBasisId":null,"HurdleRateBasisName":null,"HurdleRatePct":null,"HurdleRateIndexId":null,"HurdleRateIndexName":null,"PreferredReturnRatePct":0,"GpCatchUp":null,"PreferredReturnComments":null,"Clawback":false,"ClawbackPercentage":null,"AssetFeeDiscountTypeId":1,"AssetFeeDiscountTypeName":"Management Fee","FeeComments":"New fees effective 1/1/2019 \n\nManagement fee is an Asset Based fee of the lesser of $1M or 1.5% of NAV.  This is a payment in advance of any performance fee, making the management fee effectively zero.\n\nIncentive fee is 30% on first 15% of performance, 35% thereafter.\n\nAudit holdbacks should be zero unless the vehicle is in liquidation, in which case it's typically a 5% holdback paid once the audit is completed where applicable or 2-3 months after the final NAV once all the expenses have been paid.","FeeReductionsNegotiated":null,"InvestmentStatusId":0,"LegalParentClassId":null},"LegalFundClassSideLetterViewModel":null},{"LegalFundClassCommercialViewModel":{"Description":"Class B1","AuditSummary":"wfilipek Jun 06, 2019","FeesReviewSummary":"kweigand Feb 19, 2019","TermsReviewSummary":"fblack Nov 21, 2018","Id":13716,"FundId":237146,"FundClassType":3,"CurrencyId":null,"PrimaryCurrencyName":null,"OtherCurrencyName":[],"ManagerStrategyId":null,"ManagerStrategyName":null,"SubVotingId":null,"SubVotingName":null,"SubHotIssueId":null,"SubHotIssueName":null,"RedsFrqncyId":5,"RedsFrqncyName":"Quarterly","RedsNoticeDays":46,"NoticeTypeOfDaysId":2,"NoticeTypeOfDaysName":"Calendar","LockupTypeId":5,"LockupTypeName":"No Lock","HardDurationMonthsId":null,"HardDurationMonthsName":null,"SoftDurationMonthsId":22,"SoftDurationMonthsName":"72","LockupFees0To12Pct":0,"LockupFees12To24Pct":0,"LockupFees24To36Pct":0,"WebfolioRedsFee":null,"LockupComments":"In the SOT, there is a 1-year lock, this is no longer applicable and was only applicable for the original transfer from Sylebra commingled.","ApplyGateDecliningBalance":false,"GateInvestorPct":0,"GateSourceId":null,"GateSourceName":null,"GateFundClassPct":0,"IntialProceeds":100,"PaymentInDays":30,"PaymentTypeOfDaysId":2,"PaymentTypeOfDaysName":"Calendar","HoldbackPercentage":0,"HoldbackPayment":null,"HoldbackTypeOfDaysId":null,"HoldbackTypeOfDaysName":null,"ManagementFeeRate":0,"IncentiveFeeRate":30,"RealizationFrequencyId":7,"RealizationFrequencyName":"Yearly","HighWaterMarkId":1,"HighWaterMarkName":"Standard","HurdleRate":false,"HurdleRateBasisId":null,"HurdleRateBasisName":null,"HurdleRatePct":null,"HurdleRateIndexId":null,"HurdleRateIndexName":null,"PreferredReturnRatePct":0,"GpCatchUp":null,"PreferredReturnComments":null,"Clawback":false,"ClawbackPercentage":null,"AssetFeeDiscountTypeId":1,"AssetFeeDiscountTypeName":"Management Fee","FeeComments":"New fees effective 1/1/2019 \n\nManagement fee is an Asset Based fee of the lesser of $1M or 1.5% of NAV.  This is a payment in advance of any performance fee, making the management fee effectively zero.\n\nIncentive fee is 30% on first 15% of performance, 35% thereafter.\n\nAudit holdbacks should be zero unless the vehicle is in liquidation, in which case it's typically a 5% holdback paid once the audit is completed where applicable or 2-3 months after the final NAV once all the expenses have been paid.","FeeReductionsNegotiated":null,"InvestmentStatusId":1,"LegalParentClassId":null},"LegalFundClassSideLetterViewModel":null},{"LegalFundClassCommercialViewModel":{"Description":"Class B","AuditSummary":"dmukerji May 28, 2019","FeesReviewSummary":"dmukerji May 28, 2019","TermsReviewSummary":"kweigand Jan 16, 2019","Id":13717,"FundId":237146,"FundClassType":3,"CurrencyId":null,"PrimaryCurrencyName":null,"OtherCurrencyName":[],"ManagerStrategyId":null,"ManagerStrategyName":null,"SubVotingId":null,"SubVotingName":null,"SubHotIssueId":null,"SubHotIssueName":null,"RedsFrqncyId":5,"RedsFrqncyName":"Quarterly","RedsNoticeDays":46,"NoticeTypeOfDaysId":2,"NoticeTypeOfDaysName":"Calendar","LockupTypeId":5,"LockupTypeName":"No Lock","HardDurationMonthsId":null,"HardDurationMonthsName":null,"SoftDurationMonthsId":null,"SoftDurationMonthsName":null,"LockupFees0To12Pct":0,"LockupFees12To24Pct":0,"LockupFees24To36Pct":0,"WebfolioRedsFee":null,"LockupComments":"In the SOT, there is a 1-year lock, this is no longer applicable and was only applicable for the original transfer from Sylebra commingled.","ApplyGateDecliningBalance":false,"GateInvestorPct":0,"GateSourceId":null,"GateSourceName":null,"GateFundClassPct":0,"IntialProceeds":100,"PaymentInDays":30,"PaymentTypeOfDaysId":2,"PaymentTypeOfDaysName":"Calendar","HoldbackPercentage":0,"HoldbackPayment":null,"HoldbackTypeOfDaysId":null,"HoldbackTypeOfDaysName":null,"ManagementFeeRate":0,"IncentiveFeeRate":30,"RealizationFrequencyId":7,"RealizationFrequencyName":"Yearly","HighWaterMarkId":1,"HighWaterMarkName":"Standard","HurdleRate":false,"HurdleRateBasisId":null,"HurdleRateBasisName":null,"HurdleRatePct":null,"HurdleRateIndexId":null,"HurdleRateIndexName":null,"PreferredReturnRatePct":0,"GpCatchUp":null,"PreferredReturnComments":null,"Clawback":false,"ClawbackPercentage":null,"AssetFeeDiscountTypeId":1,"AssetFeeDiscountTypeName":"Management Fee","FeeComments":"New fees effective 1/1/2019 \n\nManagement fee is an Asset Based fee of the lesser of $1M or 1.5% of NAV.  This is a payment in advance of any performance fee, making the management fee effectively zero.\n\nIncentive fee is 30% on first 15% of performance, 35% thereafter.\n\nAudit holdbacks should be zero unless the vehicle is in liquidation, in which case it's typically a 5% holdback paid once the audit is completed where applicable or 2-3 months after the final NAV once all the expenses have been paid.","FeeReductionsNegotiated":null,"InvestmentStatusId":1,"LegalParentClassId":null},"LegalFundClassSideLetterViewModel":null},{"LegalFundClassCommercialViewModel":{"Description":"test45454","AuditSummary":"rmenon Jun 10, 2019","FeesReviewSummary":"","TermsReviewSummary":"","Id":28466,"FundId":5508,"FundClassType":1,"CurrencyId":null,"PrimaryCurrencyName":null,"OtherCurrencyName":[],"ManagerStrategyId":null,"ManagerStrategyName":null,"SubVotingId":null,"SubVotingName":null,"SubHotIssueId":null,"SubHotIssueName":null,"RedsFrqncyId":5,"RedsFrqncyName":"Quarterly","RedsNoticeDays":45,"NoticeTypeOfDaysId":2,"NoticeTypeOfDaysName":"Calendar","LockupTypeId":null,"LockupTypeName":null,"HardDurationMonthsId":null,"HardDurationMonthsName":null,"SoftDurationMonthsId":null,"SoftDurationMonthsName":null,"LockupFees0To12Pct":3,"LockupFees12To24Pct":null,"LockupFees24To36Pct":null,"WebfolioRedsFee":null,"LockupComments":null,"ApplyGateDecliningBalance":false,"GateInvestorPct":null,"GateSourceId":null,"GateSourceName":null,"GateFundClassPct":null,"IntialProceeds":null,"PaymentInDays":null,"PaymentTypeOfDaysId":null,"PaymentTypeOfDaysName":null,"HoldbackPercentage":null,"HoldbackPayment":null,"HoldbackTypeOfDaysId":null,"HoldbackTypeOfDaysName":null,"ManagementFeeRate":null,"IncentiveFeeRate":null,"RealizationFrequencyId":null,"RealizationFrequencyName":null,"HighWaterMarkId":null,"HighWaterMarkName":null,"HurdleRate":false,"HurdleRateBasisId":null,"HurdleRateBasisName":null,"HurdleRatePct":null,"HurdleRateIndexId":null,"HurdleRateIndexName":null,"PreferredReturnRatePct":null,"GpCatchUp":null,"PreferredReturnComments":null,"Clawback":false,"ClawbackPercentage":null,"AssetFeeDiscountTypeId":null,"AssetFeeDiscountTypeName":null,"FeeComments":null,"FeeReductionsNegotiated":null,"InvestmentStatusId":0,"LegalParentClassId":null},"LegalFundClassSideLetterViewModel":null}]

3 个答案:

答案 0 :(得分:0)

代码中的属性名称与json不匹配。

您的json对象具有两个属性: LegalFundClassCommercialViewModel LegalFundClassSideLetterViewModel 。 但是您的代码引用的是 LegalFundClassViewModel

假设此。TermDetails包含您提供的json,请尝试以下操作:

this.TermDetails.filter(obj => 
obj.LegalFundClassCommercialViewModel.InvestmentStatusId === 1)

答案 1 :(得分:0)

使用filter()方法时,它将遍历数组中的每个元素,在您的情况下,它将返回以下对象

{
    LegalFundClassCommercialViewModel: ...,
    LegalFundClassSideLetterViewModel: ...
}

您要访问的属性InvestmentStatusId在这些属性的值之内。请尝试下面的代码段。

var json = [{
    "LegalFundClassCommercialViewModel": {
      "Description": "Class B",
      "AuditSummary": "skeeling Jun 11, 2018",
      "FeesReviewSummary": "",
      "TermsReviewSummary": "",
      "Id": 11166,
      "FundId": 5508,
      "FundClassType": 1,
      "CurrencyId": null,
      "PrimaryCurrencyName": null,
      "OtherCurrencyName": [],
      "ManagerStrategyId": null,
      "ManagerStrategyName": null,
      "SubVotingId": null,
      "SubVotingName": null,
      "SubHotIssueId": null,
      "SubHotIssueName": null,
      "RedsFrqncyId": 5,
      "RedsFrqncyName": "Quarterly",
      "RedsNoticeDays": 45,
      "NoticeTypeOfDaysId": 2,
      "NoticeTypeOfDaysName": "Calendar",
      "LockupTypeId": null,
      "LockupTypeName": null,
      "HardDurationMonthsId": null,
      "HardDurationMonthsName": null,
      "SoftDurationMonthsId": null,
      "SoftDurationMonthsName": null,
      "LockupFees0To12Pct": 3,
      "LockupFees12To24Pct": null,
      "LockupFees24To36Pct": null,
      "WebfolioRedsFee": "12 M,0.03|",
      "LockupComments": null,
      "ApplyGateDecliningBalance": false,
      "GateInvestorPct": null,
      "GateSourceId": null,
      "GateSourceName": null,
      "GateFundClassPct": null,
      "IntialProceeds": null,
      "PaymentInDays": null,
      "PaymentTypeOfDaysId": null,
      "PaymentTypeOfDaysName": null,
      "HoldbackPercentage": null,
      "HoldbackPayment": null,
      "HoldbackTypeOfDaysId": null,
      "HoldbackTypeOfDaysName": null,
      "ManagementFeeRate": null,
      "IncentiveFeeRate": null,
      "RealizationFrequencyId": null,
      "RealizationFrequencyName": null,
      "HighWaterMarkId": null,
      "HighWaterMarkName": null,
      "HurdleRate": false,
      "HurdleRateBasisId": null,
      "HurdleRateBasisName": null,
      "HurdleRatePct": null,
      "HurdleRateIndexId": null,
      "HurdleRateIndexName": null,
      "PreferredReturnRatePct": null,
      "GpCatchUp": null,
      "PreferredReturnComments": null,
      "Clawback": false,
      "ClawbackPercentage": null,
      "AssetFeeDiscountTypeId": null,
      "AssetFeeDiscountTypeName": null,
      "FeeComments": null,
      "FeeReductionsNegotiated": null,
      "InvestmentStatusId": 0,
      "LegalParentClassId": null
    },
    "LegalFundClassSideLetterViewModel": null
  },
  {
    "LegalFundClassCommercialViewModel": {
      "Description": "Class A",
      "AuditSummary": "skeeling Jun 11, 2018",
      "FeesReviewSummary": "",
      "TermsReviewSummary": "",
      "Id": 11167,
      "FundId": 5508,
      "FundClassType": 1,
      "CurrencyId": null,
      "PrimaryCurrencyName": null,
      "OtherCurrencyName": [],
      "ManagerStrategyId": null,
      "ManagerStrategyName": null,
      "SubVotingId": null,
      "SubVotingName": null,
      "SubHotIssueId": null,
      "SubHotIssueName": null,
      "RedsFrqncyId": 5,
      "RedsFrqncyName": "Quarterly",
      "RedsNoticeDays": 45,
      "NoticeTypeOfDaysId": 2,
      "NoticeTypeOfDaysName": "Calendar",
      "LockupTypeId": null,
      "LockupTypeName": null,
      "HardDurationMonthsId": null,
      "HardDurationMonthsName": null,
      "SoftDurationMonthsId": null,
      "SoftDurationMonthsName": null,
      "LockupFees0To12Pct": 3,
      "LockupFees12To24Pct": null,
      "LockupFees24To36Pct": null,
      "WebfolioRedsFee": "12 M,0.03|",
      "LockupComments": null,
      "ApplyGateDecliningBalance": false,
      "GateInvestorPct": null,
      "GateSourceId": null,
      "GateSourceName": null,
      "GateFundClassPct": null,
      "IntialProceeds": null,
      "PaymentInDays": null,
      "PaymentTypeOfDaysId": null,
      "PaymentTypeOfDaysName": null,
      "HoldbackPercentage": null,
      "HoldbackPayment": null,
      "HoldbackTypeOfDaysId": null,
      "HoldbackTypeOfDaysName": null,
      "ManagementFeeRate": null,
      "IncentiveFeeRate": null,
      "RealizationFrequencyId": null,
      "RealizationFrequencyName": null,
      "HighWaterMarkId": null,
      "HighWaterMarkName": null,
      "HurdleRate": false,
      "HurdleRateBasisId": null,
      "HurdleRateBasisName": null,
      "HurdleRatePct": null,
      "HurdleRateIndexId": null,
      "HurdleRateIndexName": null,
      "PreferredReturnRatePct": null,
      "GpCatchUp": null,
      "PreferredReturnComments": null,
      "Clawback": false,
      "ClawbackPercentage": null,
      "AssetFeeDiscountTypeId": null,
      "AssetFeeDiscountTypeName": null,
      "FeeComments": null,
      "FeeReductionsNegotiated": null,
      "InvestmentStatusId": 0,
      "LegalParentClassId": null
    },
    "LegalFundClassSideLetterViewModel": null
  },
  {
    "LegalFundClassCommercialViewModel": {
      "Description": "Class A",
      "AuditSummary": "rmenon Jun 10, 2019",
      "FeesReviewSummary": "dmukerji May 28, 2019",
      "TermsReviewSummary": "kweigand Jan 16, 2019",
      "Id": 13713,
      "FundId": 237146,
      "FundClassType": 3,
      "CurrencyId": 19,
      "PrimaryCurrencyName": "BRL",
      "OtherCurrencyName": [
        10,
        19,
        7
      ],
      "ManagerStrategyId": 5508,
      "ManagerStrategyName": "Sylebra ",
      "SubVotingId": null,
      "SubVotingName": null,
      "SubHotIssueId": null,
      "SubHotIssueName": null,
      "RedsFrqncyId": 5,
      "RedsFrqncyName": "Quarterly",
      "RedsNoticeDays": 46,
      "NoticeTypeOfDaysId": 2,
      "NoticeTypeOfDaysName": "Calendar",
      "LockupTypeId": 5,
      "LockupTypeName": "No Lock",
      "HardDurationMonthsId": 2,
      "HardDurationMonthsName": "3",
      "SoftDurationMonthsId": 3,
      "SoftDurationMonthsName": "6",
      "LockupFees0To12Pct": 2,
      "LockupFees12To24Pct": 2,
      "LockupFees24To36Pct": 0,
      "WebfolioRedsFee": null,
      "LockupComments": "In the SOT, there is a 1-year lock, this is no longer applicable and was only applicable for the original transfer from Sylebra commingled.",
      "ApplyGateDecliningBalance": true,
      "GateInvestorPct": 3,
      "GateSourceId": 1,
      "GateSourceName": "Fund Gate",
      "GateFundClassPct": 3,
      "IntialProceeds": 100,
      "PaymentInDays": 30,
      "PaymentTypeOfDaysId": 2,
      "PaymentTypeOfDaysName": "Calendar",
      "HoldbackPercentage": 0,
      "HoldbackPayment": 2,
      "HoldbackTypeOfDaysId": 1,
      "HoldbackTypeOfDaysName": "Business",
      "ManagementFeeRate": 0,
      "IncentiveFeeRate": 30,
      "RealizationFrequencyId": 7,
      "RealizationFrequencyName": "Yearly",
      "HighWaterMarkId": 1,
      "HighWaterMarkName": "Standard",
      "HurdleRate": false,
      "HurdleRateBasisId": null,
      "HurdleRateBasisName": null,
      "HurdleRatePct": null,
      "HurdleRateIndexId": null,
      "HurdleRateIndexName": null,
      "PreferredReturnRatePct": 0,
      "GpCatchUp": "test",
      "PreferredReturnComments": null,
      "Clawback": false,
      "ClawbackPercentage": null,
      "AssetFeeDiscountTypeId": 1,
      "AssetFeeDiscountTypeName": "Management Fee",
      "FeeComments": "New fees effective 1/1/2019 \n\nManagement fee is an Asset Based fee of the lesser of $1M or 1.5% of NAV.  This is a payment in advance of any performance fee, making the management fee effectively zero.\n\nIncentive fee is 30% on first 15% of performance, 35% thereafter.\n\nAudit holdbacks should be zero unless the vehicle is in liquidation, in which case it's typically a 5% holdback paid once the audit is completed where applicable or 2-3 months after the final NAV once all the expenses have been paid.",
      "FeeReductionsNegotiated": null,
      "InvestmentStatusId": 1,
      "LegalParentClassId": null
    },
    "LegalFundClassSideLetterViewModel": {
      "Description": "Class A",
      "AuditSummary": "rmenon Jun 10, 2019",
      "FeesReviewSummary": "dmukerji May 28, 2019",
      "TermsReviewSummary": "kweigand Jan 16, 2019",
      "Id": 28465,
      "FundId": 237146,
      "FundClassType": 4,
      "CurrencyId": 7,
      "PrimaryCurrencyName": "AUD",
      "OtherCurrencyName": [],
      "ManagerStrategyId": 5508,
      "ManagerStrategyName": "Sylebra ",
      "SubVotingId": null,
      "SubVotingName": null,
      "SubHotIssueId": null,
      "SubHotIssueName": null,
      "RedsFrqncyId": 2,
      "RedsFrqncyName": "Weekly",
      "RedsNoticeDays": 46,
      "NoticeTypeOfDaysId": 2,
      "NoticeTypeOfDaysName": "Calendar",
      "LockupTypeId": 5,
      "LockupTypeName": "No Lock",
      "HardDurationMonthsId": 2,
      "HardDurationMonthsName": "3",
      "SoftDurationMonthsId": 3,
      "SoftDurationMonthsName": "6",
      "LockupFees0To12Pct": 2,
      "LockupFees12To24Pct": 2,
      "LockupFees24To36Pct": 0,
      "WebfolioRedsFee": null,
      "LockupComments": "In the SOT, there is a 1-year lock, this is no longer applicable and was only applicable for the original transfer from Sylebra commingled.",
      "ApplyGateDecliningBalance": true,
      "GateInvestorPct": 3,
      "GateSourceId": 1,
      "GateSourceName": "Fund Gate",
      "GateFundClassPct": 3,
      "IntialProceeds": 100,
      "PaymentInDays": 30,
      "PaymentTypeOfDaysId": 2,
      "PaymentTypeOfDaysName": "Calendar",
      "HoldbackPercentage": 0,
      "HoldbackPayment": 2,
      "HoldbackTypeOfDaysId": 1,
      "HoldbackTypeOfDaysName": "Business",
      "ManagementFeeRate": 0,
      "IncentiveFeeRate": 30,
      "RealizationFrequencyId": 7,
      "RealizationFrequencyName": "Yearly",
      "HighWaterMarkId": 1,
      "HighWaterMarkName": "Standard",
      "HurdleRate": false,
      "HurdleRateBasisId": null,
      "HurdleRateBasisName": null,
      "HurdleRatePct": null,
      "HurdleRateIndexId": null,
      "HurdleRateIndexName": null,
      "PreferredReturnRatePct": 0,
      "GpCatchUp": "test",
      "PreferredReturnComments": null,
      "Clawback": false,
      "ClawbackPercentage": null,
      "AssetFeeDiscountTypeId": 1,
      "AssetFeeDiscountTypeName": "Management Fee",
      "FeeComments": "New fees effective 1/1/2019 \n\nManagement fee is an Asset Based fee of the lesser of $1M or 1.5% of NAV.  This is a payment in advance of any performance fee, making the management fee effectively zero.\n\nIncentive fee is 30% on first 15% of performance, 35% thereafter.\n\nAudit holdbacks should be zero unless the vehicle is in liquidation, in which case it's typically a 5% holdback paid once the audit is completed where applicable or 2-3 months after the final NAV once all the expenses have been paid.",
      "FeeReductionsNegotiated": null,
      "InvestmentStatusId": 1,
      "LegalParentClassId": 13713
    }
  },
  {
    "LegalFundClassCommercialViewModel": {
      "Description": "Class D",
      "AuditSummary": " ",
      "FeesReviewSummary": "",
      "TermsReviewSummary": "",
      "Id": 13714,
      "FundId": 237146,
      "FundClassType": 3,
      "CurrencyId": null,
      "PrimaryCurrencyName": null,
      "OtherCurrencyName": [],
      "ManagerStrategyId": null,
      "ManagerStrategyName": null,
      "SubVotingId": null,
      "SubVotingName": null,
      "SubHotIssueId": null,
      "SubHotIssueName": null,
      "RedsFrqncyId": 5,
      "RedsFrqncyName": "Quarterly",
      "RedsNoticeDays": 45,
      "NoticeTypeOfDaysId": 2,
      "NoticeTypeOfDaysName": "Calendar",
      "LockupTypeId": null,
      "LockupTypeName": null,
      "HardDurationMonthsId": null,
      "HardDurationMonthsName": null,
      "SoftDurationMonthsId": null,
      "SoftDurationMonthsName": null,
      "LockupFees0To12Pct": null,
      "LockupFees12To24Pct": null,
      "LockupFees24To36Pct": null,
      "WebfolioRedsFee": null,
      "LockupComments": null,
      "ApplyGateDecliningBalance": false,
      "GateInvestorPct": null,
      "GateSourceId": null,
      "GateSourceName": null,
      "GateFundClassPct": null,
      "IntialProceeds": null,
      "PaymentInDays": null,
      "PaymentTypeOfDaysId": null,
      "PaymentTypeOfDaysName": null,
      "HoldbackPercentage": null,
      "HoldbackPayment": null,
      "HoldbackTypeOfDaysId": null,
      "HoldbackTypeOfDaysName": null,
      "ManagementFeeRate": null,
      "IncentiveFeeRate": null,
      "RealizationFrequencyId": null,
      "RealizationFrequencyName": null,
      "HighWaterMarkId": null,
      "HighWaterMarkName": null,
      "HurdleRate": false,
      "HurdleRateBasisId": null,
      "HurdleRateBasisName": null,
      "HurdleRatePct": null,
      "HurdleRateIndexId": null,
      "HurdleRateIndexName": null,
      "PreferredReturnRatePct": null,
      "GpCatchUp": null,
      "PreferredReturnComments": null,
      "Clawback": false,
      "ClawbackPercentage": null,
      "AssetFeeDiscountTypeId": null,
      "AssetFeeDiscountTypeName": null,
      "FeeComments": null,
      "FeeReductionsNegotiated": null,
      "InvestmentStatusId": 0,
      "LegalParentClassId": null
    },
    "LegalFundClassSideLetterViewModel": null
  },
  {
    "LegalFundClassCommercialViewModel": {
      "Description": "Class C",
      "AuditSummary": "kweigand Feb 19, 2019",
      "FeesReviewSummary": "kweigand Feb 19, 2019",
      "TermsReviewSummary": "fblack Nov 21, 2018",
      "Id": 13715,
      "FundId": 237146,
      "FundClassType": 3,
      "CurrencyId": null,
      "PrimaryCurrencyName": null,
      "OtherCurrencyName": [],
      "ManagerStrategyId": null,
      "ManagerStrategyName": null,
      "SubVotingId": null,
      "SubVotingName": null,
      "SubHotIssueId": null,
      "SubHotIssueName": null,
      "RedsFrqncyId": 5,
      "RedsFrqncyName": "Quarterly",
      "RedsNoticeDays": 46,
      "NoticeTypeOfDaysId": 2,
      "NoticeTypeOfDaysName": "Calendar",
      "LockupTypeId": 5,
      "LockupTypeName": "No Lock",
      "HardDurationMonthsId": null,
      "HardDurationMonthsName": null,
      "SoftDurationMonthsId": null,
      "SoftDurationMonthsName": null,
      "LockupFees0To12Pct": 0,
      "LockupFees12To24Pct": 0,
      "LockupFees24To36Pct": 0,
      "WebfolioRedsFee": null,
      "LockupComments": "In the SOT, there is a 1-year lock, this is no longer applicable and was only applicable for the original transfer from Sylebra commingled.",
      "ApplyGateDecliningBalance": false,
      "GateInvestorPct": 0,
      "GateSourceId": null,
      "GateSourceName": null,
      "GateFundClassPct": 0,
      "IntialProceeds": 100,
      "PaymentInDays": 30,
      "PaymentTypeOfDaysId": 2,
      "PaymentTypeOfDaysName": "Calendar",
      "HoldbackPercentage": 0,
      "HoldbackPayment": null,
      "HoldbackTypeOfDaysId": null,
      "HoldbackTypeOfDaysName": null,
      "ManagementFeeRate": 0,
      "IncentiveFeeRate": 30,
      "RealizationFrequencyId": 7,
      "RealizationFrequencyName": "Yearly",
      "HighWaterMarkId": 1,
      "HighWaterMarkName": "Standard",
      "HurdleRate": false,
      "HurdleRateBasisId": null,
      "HurdleRateBasisName": null,
      "HurdleRatePct": null,
      "HurdleRateIndexId": null,
      "HurdleRateIndexName": null,
      "PreferredReturnRatePct": 0,
      "GpCatchUp": null,
      "PreferredReturnComments": null,
      "Clawback": false,
      "ClawbackPercentage": null,
      "AssetFeeDiscountTypeId": 1,
      "AssetFeeDiscountTypeName": "Management Fee",
      "FeeComments": "New fees effective 1/1/2019 \n\nManagement fee is an Asset Based fee of the lesser of $1M or 1.5% of NAV.  This is a payment in advance of any performance fee, making the management fee effectively zero.\n\nIncentive fee is 30% on first 15% of performance, 35% thereafter.\n\nAudit holdbacks should be zero unless the vehicle is in liquidation, in which case it's typically a 5% holdback paid once the audit is completed where applicable or 2-3 months after the final NAV once all the expenses have been paid.",
      "FeeReductionsNegotiated": null,
      "InvestmentStatusId": 0,
      "LegalParentClassId": null
    },
    "LegalFundClassSideLetterViewModel": null
  },
  {
    "LegalFundClassCommercialViewModel": {
      "Description": "Class B1",
      "AuditSummary": "wfilipek Jun 06, 2019",
      "FeesReviewSummary": "kweigand Feb 19, 2019",
      "TermsReviewSummary": "fblack Nov 21, 2018",
      "Id": 13716,
      "FundId": 237146,
      "FundClassType": 3,
      "CurrencyId": null,
      "PrimaryCurrencyName": null,
      "OtherCurrencyName": [],
      "ManagerStrategyId": null,
      "ManagerStrategyName": null,
      "SubVotingId": null,
      "SubVotingName": null,
      "SubHotIssueId": null,
      "SubHotIssueName": null,
      "RedsFrqncyId": 5,
      "RedsFrqncyName": "Quarterly",
      "RedsNoticeDays": 46,
      "NoticeTypeOfDaysId": 2,
      "NoticeTypeOfDaysName": "Calendar",
      "LockupTypeId": 5,
      "LockupTypeName": "No Lock",
      "HardDurationMonthsId": null,
      "HardDurationMonthsName": null,
      "SoftDurationMonthsId": 22,
      "SoftDurationMonthsName": "72",
      "LockupFees0To12Pct": 0,
      "LockupFees12To24Pct": 0,
      "LockupFees24To36Pct": 0,
      "WebfolioRedsFee": null,
      "LockupComments": "In the SOT, there is a 1-year lock, this is no longer applicable and was only applicable for the original transfer from Sylebra commingled.",
      "ApplyGateDecliningBalance": false,
      "GateInvestorPct": 0,
      "GateSourceId": null,
      "GateSourceName": null,
      "GateFundClassPct": 0,
      "IntialProceeds": 100,
      "PaymentInDays": 30,
      "PaymentTypeOfDaysId": 2,
      "PaymentTypeOfDaysName": "Calendar",
      "HoldbackPercentage": 0,
      "HoldbackPayment": null,
      "HoldbackTypeOfDaysId": null,
      "HoldbackTypeOfDaysName": null,
      "ManagementFeeRate": 0,
      "IncentiveFeeRate": 30,
      "RealizationFrequencyId": 7,
      "RealizationFrequencyName": "Yearly",
      "HighWaterMarkId": 1,
      "HighWaterMarkName": "Standard",
      "HurdleRate": false,
      "HurdleRateBasisId": null,
      "HurdleRateBasisName": null,
      "HurdleRatePct": null,
      "HurdleRateIndexId": null,
      "HurdleRateIndexName": null,
      "PreferredReturnRatePct": 0,
      "GpCatchUp": null,
      "PreferredReturnComments": null,
      "Clawback": false,
      "ClawbackPercentage": null,
      "AssetFeeDiscountTypeId": 1,
      "AssetFeeDiscountTypeName": "Management Fee",
      "FeeComments": "New fees effective 1/1/2019 \n\nManagement fee is an Asset Based fee of the lesser of $1M or 1.5% of NAV.  This is a payment in advance of any performance fee, making the management fee effectively zero.\n\nIncentive fee is 30% on first 15% of performance, 35% thereafter.\n\nAudit holdbacks should be zero unless the vehicle is in liquidation, in which case it's typically a 5% holdback paid once the audit is completed where applicable or 2-3 months after the final NAV once all the expenses have been paid.",
      "FeeReductionsNegotiated": null,
      "InvestmentStatusId": 1,
      "LegalParentClassId": null
    },
    "LegalFundClassSideLetterViewModel": null
  },
  {
    "LegalFundClassCommercialViewModel": {
      "Description": "Class B",
      "AuditSummary": "dmukerji May 28, 2019",
      "FeesReviewSummary": "dmukerji May 28, 2019",
      "TermsReviewSummary": "kweigand Jan 16, 2019",
      "Id": 13717,
      "FundId": 237146,
      "FundClassType": 3,
      "CurrencyId": null,
      "PrimaryCurrencyName": null,
      "OtherCurrencyName": [],
      "ManagerStrategyId": null,
      "ManagerStrategyName": null,
      "SubVotingId": null,
      "SubVotingName": null,
      "SubHotIssueId": null,
      "SubHotIssueName": null,
      "RedsFrqncyId": 5,
      "RedsFrqncyName": "Quarterly",
      "RedsNoticeDays": 46,
      "NoticeTypeOfDaysId": 2,
      "NoticeTypeOfDaysName": "Calendar",
      "LockupTypeId": 5,
      "LockupTypeName": "No Lock",
      "HardDurationMonthsId": null,
      "HardDurationMonthsName": null,
      "SoftDurationMonthsId": null,
      "SoftDurationMonthsName": null,
      "LockupFees0To12Pct": 0,
      "LockupFees12To24Pct": 0,
      "LockupFees24To36Pct": 0,
      "WebfolioRedsFee": null,
      "LockupComments": "In the SOT, there is a 1-year lock, this is no longer applicable and was only applicable for the original transfer from Sylebra commingled.",
      "ApplyGateDecliningBalance": false,
      "GateInvestorPct": 0,
      "GateSourceId": null,
      "GateSourceName": null,
      "GateFundClassPct": 0,
      "IntialProceeds": 100,
      "PaymentInDays": 30,
      "PaymentTypeOfDaysId": 2,
      "PaymentTypeOfDaysName": "Calendar",
      "HoldbackPercentage": 0,
      "HoldbackPayment": null,
      "HoldbackTypeOfDaysId": null,
      "HoldbackTypeOfDaysName": null,
      "ManagementFeeRate": 0,
      "IncentiveFeeRate": 30,
      "RealizationFrequencyId": 7,
      "RealizationFrequencyName": "Yearly",
      "HighWaterMarkId": 1,
      "HighWaterMarkName": "Standard",
      "HurdleRate": false,
      "HurdleRateBasisId": null,
      "HurdleRateBasisName": null,
      "HurdleRatePct": null,
      "HurdleRateIndexId": null,
      "HurdleRateIndexName": null,
      "PreferredReturnRatePct": 0,
      "GpCatchUp": null,
      "PreferredReturnComments": null,
      "Clawback": false,
      "ClawbackPercentage": null,
      "AssetFeeDiscountTypeId": 1,
      "AssetFeeDiscountTypeName": "Management Fee",
      "FeeComments": "New fees effective 1/1/2019 \n\nManagement fee is an Asset Based fee of the lesser of $1M or 1.5% of NAV.  This is a payment in advance of any performance fee, making the management fee effectively zero.\n\nIncentive fee is 30% on first 15% of performance, 35% thereafter.\n\nAudit holdbacks should be zero unless the vehicle is in liquidation, in which case it's typically a 5% holdback paid once the audit is completed where applicable or 2-3 months after the final NAV once all the expenses have been paid.",
      "FeeReductionsNegotiated": null,
      "InvestmentStatusId": 1,
      "LegalParentClassId": null
    },
    "LegalFundClassSideLetterViewModel": null
  },
  {
    "LegalFundClassCommercialViewModel": {
      "Description": "test45454",
      "AuditSummary": "rmenon Jun 10, 2019",
      "FeesReviewSummary": "",
      "TermsReviewSummary": "",
      "Id": 28466,
      "FundId": 5508,
      "FundClassType": 1,
      "CurrencyId": null,
      "PrimaryCurrencyName": null,
      "OtherCurrencyName": [],
      "ManagerStrategyId": null,
      "ManagerStrategyName": null,
      "SubVotingId": null,
      "SubVotingName": null,
      "SubHotIssueId": null,
      "SubHotIssueName": null,
      "RedsFrqncyId": 5,
      "RedsFrqncyName": "Quarterly",
      "RedsNoticeDays": 45,
      "NoticeTypeOfDaysId": 2,
      "NoticeTypeOfDaysName": "Calendar",
      "LockupTypeId": null,
      "LockupTypeName": null,
      "HardDurationMonthsId": null,
      "HardDurationMonthsName": null,
      "SoftDurationMonthsId": null,
      "SoftDurationMonthsName": null,
      "LockupFees0To12Pct": 3,
      "LockupFees12To24Pct": null,
      "LockupFees24To36Pct": null,
      "WebfolioRedsFee": null,
      "LockupComments": null,
      "ApplyGateDecliningBalance": false,
      "GateInvestorPct": null,
      "GateSourceId": null,
      "GateSourceName": null,
      "GateFundClassPct": null,
      "IntialProceeds": null,
      "PaymentInDays": null,
      "PaymentTypeOfDaysId": null,
      "PaymentTypeOfDaysName": null,
      "HoldbackPercentage": null,
      "HoldbackPayment": null,
      "HoldbackTypeOfDaysId": null,
      "HoldbackTypeOfDaysName": null,
      "ManagementFeeRate": null,
      "IncentiveFeeRate": null,
      "RealizationFrequencyId": null,
      "RealizationFrequencyName": null,
      "HighWaterMarkId": null,
      "HighWaterMarkName": null,
      "HurdleRate": false,
      "HurdleRateBasisId": null,
      "HurdleRateBasisName": null,
      "HurdleRatePct": null,
      "HurdleRateIndexId": null,
      "HurdleRateIndexName": null,
      "PreferredReturnRatePct": null,
      "GpCatchUp": null,
      "PreferredReturnComments": null,
      "Clawback": false,
      "ClawbackPercentage": null,
      "AssetFeeDiscountTypeId": null,
      "AssetFeeDiscountTypeName": null,
      "FeeComments": null,
      "FeeReductionsNegotiated": null,
      "InvestmentStatusId": 0,
      "LegalParentClassId": null
    },
    "LegalFundClassSideLetterViewModel": null
  }
];

var filteredJson = this.json.filter(obj => {
  for (var prop in obj) {
    return obj[prop] ? obj[prop].InvestmentStatusId === 1 : null;
  }
});
console.log(filteredJson);

答案 2 :(得分:0)

假设您的JSON数组存储在名为array的变量中:

const newArray = this.array.filter(item => item.LegalFundClassCommercialViewModel.InvestmentStatusId === 1);

console.log(newArray); // new array of 3 objects

这应该给您包含InvestmentStatusId: 1

的对象数组

或者,如果您想获取不等于1的对象,只需将===翻转到!==即可,如下所示:

const newArray = this.array.filter(item => item.LegalFundClassCommercialViewModel.InvestmentStatusId !== 1);

console.log(newArray); // new array of 5 objects