in reply to Re: Sort the hash array
in thread Sort the hash array
xml input
<event_list > <event> <severity> critical</severity> <priority> medium</priority> <category> SLB_OP_Service</category> <time_first_received> 2017-06-06T15:37:17.414Z</time_first_received> <assigned_user> <custom_attribute self="https://omi.it.slb.com:443/opr-web +/rest/9.10/event_list/031c3c70-4ace-71e7-0b5b-88fb83170000/custom_att +ribute_list/SLB_SSRID" type="urn:x-hp:2009:software:data_model:opr:ty +pe:event:custom_attribute" version="1.0"> <name> SLB_SSRID</name> <value> 957</value> </custom_attribute> <custom_attribute self="https://omi.it.slb.com:443/opr-web +/rest/9.10/event_list/031c3c70-4ace-71e7-0b5b-88fb83170000/custom_att +ribute_list/Service%20Name" type="urn:x-hp:2009:software:data_model:o +pr:type:event:custom_attribute" version="1.0"> <name> Service Name</name> <value> IPT</value> </custom_attribute> </custom_attribute_list> </event> </eventlist>
Dumber output :
$VAR1 = { 'severity' => 'critical', 'appname' => 'Instant Messaging - Lync External(2667)', 'line' => 1, 'ticketnum' => 'INC000018455813', 'remedy_queue' => [ 'Global Service Desk' ], 'event_age' => '2157 h' }; $VAR2 = { 'event_age' => '2157 h', 'remedy_queue' => [ 'Global Service Desk' ], 'ticketnum' => 'INC000018455811', 'line' => 2, 'severity' => 'critical', 'appname' => 'Instant Messaging - Lync External(2667)' }; $VAR3 = { 'ticketnum' => 'INC000018450232', 'severity' => 'critical', 'appname' => 'EngHouse CCE(1103)', 'line' => 3, 'event_age' => '2182 h', 'remedy_queue' => [] };
8 July 2017 Athanasius added code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Sort the hash array
by Laurent_R (Canon) on Jul 06, 2017 at 12:26 UTC |