* Converts the passed string into a JSON object (if possible) and returns the * value of the propertyName on that object. * @param {string} jsonString * @param {string} propertyName * @return {*}
(jsonString, propertyName)
| 4141 | * @return {*} |
| 4142 | */ |
| 4143 | function getPropertyFromJsonString(jsonString, propertyName) { |
| 4144 | const json = tryParseJson(jsonString); |
| 4145 | return (json && json[propertyName]) || null; |
| 4146 | } |
| 4147 | |
| 4148 | /** |
| 4149 | * Copyright 2018 The Subscribe with Google Authors. All Rights Reserved. |
no test coverage detected