'Iterate JSON file and update values using shell script without JQ
In shell script, I want to read the content from file swiftlint.json.
Iterate the array of dictionary with key issues. Read the value for key filePath and add /private in the beginning.
Here is the content of file
{
"issues": [{
"engineId": "SwiftLint",
"primaryLocation": {
"filePath": "\/RegistrationUtilities.swift",
"message": "Function should have complexity 15 or less: currently complexity equals 18",
"textRange": {
"startLine": 29
}
},
"ruleId": "cyclomatic_complexity",
"severity": "MINOR",
"type": "CODE_SMELL"
}]
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
