Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

248
Views
Acceda al elemento JSON por clave usando nodejs - devuelve indefinido

¿Cómo puedo acceder al valor de Array usando el nombre de la clave en nodejs? Me estoy volviendo undefined cuando intento acceder a él de la siguiente manera. Quiero que se imprima el valor al llamar a la tecla.

 var sns_DimensionsValue = sns.Trigger.Dimensions['ApiName'] console.log(sns_DimensionsValue)

Json Data:

 { "AlarmName": "Zabbix PY 5XX - ByName", "AlarmDescription": null, "AWSAccountId": 123456789", "NewStateValue": "ALARM", "NewStateReason": "Threshold Crossed: 1 out of the last 1 datapoints [1.0 (11/11/21 13:51:00)] was greater than or equal to the threshold (1.0) (minimum 1 datapoint for OK -> ALARM transition).", "StateChangeTime": "2021-11-11T13:52:09.318+0000", "Region": "Asia Pacific (Mumbai)", "AlarmArn": "arn:aws:cloudwatch:ap-south-1:123456789:alarm:Zabbix PY 5XX - ByName", "OldStateValue": "INSUFFICIENT_DATA", "Trigger": { "MetricName": "5XXError", "Namespace": "AWS/ApiGateway", "StatisticType": "Statistic", "Statistic": "MINIMUM", "Unit": null, "Dimensions": [ { "value": "zabbixPy-API", "name": "ApiName" } ], "Period": 60, "EvaluationPeriods": 1, "ComparisonOperator": "GreaterThanOrEqualToThreshold", "Threshold": 1, "TreatMissingData": "- TreatMissingData: missing", "EvaluateLowSampleCountPercentile": "" } }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

sns.Trigger.Dimensions.find(dimension => dimension.name === 'ApiName').value
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!