Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Json:
- {
- "vdd": {
- "sites": {
- "drupal8": {
- "account_name": "root",
- "account_pass": "root",
- "account_mail": "[email protected]",
- "site_name": "Drupal 8",
- "site_mail": "[email protected]",
- "vhost": {
- "document_root": "drupal8",
- "url": "drupal8.dev",
- "alias": ["www.drupal8.dev"]
- }
- },
- "drupal7": {
- "account_name": "root",
- "account_pass": "root",
- "account_mail": "[email protected]",
- "site_name": "Drupal 7",
- "site_mail": "[email protected]",
- "vhost": {
- "document_root": "drupal7",
- "url": "drupal7.dev",
- "alias": ["www.drupal7.dev"]
- }
- }
- }
- }
- }
- ruby code to get each url:
- config_json["vdd"]["sites"].each_with_index do |site, idx|
- puts site[idx]["vhost"]['url'] // ERROR
- end
Advertisement
Add Comment
Please, Sign In to add comment