How to group SQL DataRow results by Name depending on condition - powershell

I get results from a SQL Table with this command:
$GetData = Invoke-Sqlcmd -ConnectionString $Connection -Query $GetQuery
One single result looks like this (there are about 500 of these results):
ID : 1584
ObjId :
ARTIKEL_NR : 0
ArtBeschrieb1_3 :
KLASSE : TbXAusführungen
SMB1 : Produkt
SMW1 : TbA
SMN1 :
SMB2 : Ausführung
SMW2 : 2M-Zarge Front
SMN2 :
SMB3 : Boxtypen
SMW3 : B;C-M;D-M
SMN3 :
SMB4 : SortKZ
SMW4 :
SMN4 : 2.000000
SMB5 :
SMW5 :
SMN5 :
SMB6 :
SMW6 :
SMN6 :
SMB7 :
SMW7 :
SMN7 :
SMB8 :
SMW8 :
SMN8 :
SMB9 :
SMW9 :
SMN9 :
SMB10 :
SMW10 :
SMN10 :
SMB11 :
SMW11 :
SMN11 :
SMB12 :
SMW12 :
SMN12 :
SMB13 :
SMW13 :
SMN13 :
SMB14 :
SMW14 :
SMN14 :
SMB15 :
SMW15 :
SMN15 :
SMB16 :
SMW16 :
SMN16 :
SMB17 :
SMW17 :
SMN17 :
SMB18 :
SMW18 :
SMN18 :
SMB19 :
SMW19 :
SMN19 :
SMB20 :
SMW20 :
SMN20 :
SMB21 :
SMW21 :
SMN21 :
SMB22 :
SMW22 :
SMN22 :
SMB23 :
SMW23 :
SMN23 :
SMB24 :
SMW24 :
SMN24 :
SMB25 :
SMW25 :
SMN25 :
SMB26 :
SMW26 :
SMN26 :
SMB27 :
SMW27 :
SMN27 :
SMB28 :
SMW28 :
SMN28 :
SMB29 :
SMW29 :
SMN29 :
SMB30 :
SMW30 :
SMN30 :
DividendPreisEinhet : 0
SMB31 :
SMW31 :
SMN31 :
ArtBeschrieb1_2FR :
SMB32 :
SMW32 :
SMN32 :
OOPreisklasse :
SMB33 :
SMW33 :
SMN33 :
SMB34 :
SMW34 :
SMN34 :
SMB35 :
SMW35 :
SMN35 :
SMB36 :
SMW36 :
SMN36 :
SMB37 :
SMW37 :
SMN37 :
SMB38 :
SMW38 :
SMN38 :
SMB39 :
SMW39 :
SMN39 :
SMB40 :
SMW40 :
SMN40 :
As You can see there are always 3 SM* Properties with the same Number. I would like to group them. SMB* should become the Property Name and either SMW* or SMN* the PropertyValue, depending on which is NULL and which is not.
I think I can do the PropertyName / PropertyValue part on my own, but how can I group all corresponding SM* fields?
btw: The Fields that are not SM* fields are already OK, they should stay the way they are.
I know there is $PSObject.Properties but that does not seem to help me here?
PS Z:\Powershell-Scripts> $GetData.gettype()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Object[] System.Array

Below code should do what you want:
$GetData = Invoke-Sqlcmd -ConnectionString $Connection -Query $GetQuery
$result = foreach ($item in $GetData) {
# create an Ordered hash to collect the item data
$newObject = [ordered]#{}
# get all property names in order
$propNames = ($item.PsObject.Properties).Name
for ($i = 0; $i -lt $propNames.Count; $i++) {
$name = $propNames[$i]
if ($name -notlike 'SM*') {
$newObject[$name] = $item.$name
}
else {
$num = $name -replace '\D'
$value = if ([string]::IsNullOrWhiteSpace($item."SMW$num")) { $item."SMN$num" } else { $item."SMW$num" }
$newObject["SMB$num"] = $value
$i += 2
}
}
[PsCustomObject]$newObject
}
# output on console
$result
# output to CSV
$result | Export-Csv -Path 'D:\QueryResultCondensed.csv' -NoTypeInformation
Output for the example item:
ID : 1584
ObjId :
ARTIKEL_NR : 0
ArtBeschrieb1_3 :
KLASSE : TbXAusführungen
SMB1 : TbA
SMB2 : 2M-Zarge Front
SMB3 : B;C-M;D-M
SMB4 : 2.000000
SMB5 :
SMB6 :
SMB7 :
SMB8 :
SMB9 :
SMB10 :
SMB11 :
SMB12 :
SMB13 :
SMB14 :
SMB15 :
SMB16 :
SMB17 :
SMB18 :
SMB19 :
SMB20 :
SMB21 :
SMB22 :
SMB23 :
SMB24 :
SMB25 :
SMB26 :
SMB27 :
SMB28 :
SMB29 :
SMB30 :
DividendPreisEinhet : 0
SMB31 :
ArtBeschrieb1_2FR :
SMB32 :
OOPreisklasse :
SMB33 :
SMB34 :
SMB35 :
SMB36 :
SMB37 :
SMB38 :
SMB39 :
SMB40 :

This was what I was actually looking for - sorry for not explaining it well enough
$GetData = Invoke-Sqlcmd -ConnectionString $ConnectionLogik -Query $GetQuery
$NewData = foreach ($dat in $GetData)
{
# Get rid of empty and useless Properties
$NotArray = #("RowState","ItemArray","HasErrors")
$Objects = $dat.Psobject.properties |
Where-Object {![string]::IsNullOrWhiteSpace($_.Value) -and $_.Name -notin $NotArray} |
Select-Object Name, Value
# Create new Properties from pairs
$SingleObject = [ordered]#{}
foreach ($obj in $Objects) {
if ($obj.Name -like 'SM*') {
if ($obj.Name -like 'SMW*' -or $obj.Name -like 'SMN*') { Continue }
$match = 'SM[NW]' + $obj.Name.Substring(3) + '$'
$val = $Objects | Where-Object { $_.Name -match $match } | Select -Expand Value
$SingleObject[$obj.Value] = $val
} else {
$SingleObject[$obj.Name] = $obj.Value
}
}
[PSCustomObject]$SingleObject
}
This will leave me with output like this:
ID : 1584
ARTIKEL_NR : 0
KLASSE : TbXAusführungen
Produkt : TbA
Ausführung : 2M-Zarge Front
Boxtypen : B;C-M;D-M
SortKZ : 2.000000
DividendPreisEinhet : 0
ID : 443
ObjId : 20854
ARTIKEL_NR : 14.39007.00
ArtBeschrieb1_3 : Verpackung
KLASSE : TbALeistungenAntaro
TextID : Material.Verpackung
DividendPreisEinhet : 1
ID : 1528
ARTIKEL_NR : 0
KLASSE : TbXFrontbefestigung
ArtNoBlum :
Bezeichnung : keine
DividendPreisEinhet : 0
Which I was then able to export to CSV grouped by each KLASSE Property
$NewData | Group-Object KLASSE | ForEach-Object { $_.Group | Export-Csv I:\TRANSFER\$($_.Name).csv -delimiter ';' -NoTypeInformation }

Related

How to achieve the following using MongoDB

I used switch statement to assign some text based on different value ; here it returns correct output.
Now from the above output ,again I need to filter out few documents using regular expression.
Some thing like "where status likes 'open%'"
db.accountMailLog.aggregate([
{$match:{'$and': [{recipientId: "3003590"}, {recipientType: "2"}
]}},
{$project :
{
'_id' : 0,
'logCreated' : '$eventOccurredTime',
'subject' : 1,
'resourceType' : 'email',
'campaignName' : 1,
'emailSendDay' : 1,
'logDate' : '$eventOccurredTime',
'sentMethod' : 'campaign-email',
'visitorKey' : '',
'mediaHash' : '',
"status" : {'$switch' :
{'branches' :
[
{'case' : {'$eq' : ['$status','1']},'then' : "delivered"},
{'case' : {'$eq' : ['$status','2']},'then' : "opened"},
{'case' : {'$eq' : ['$status','3']},'then' : "clicked"},
{'case' : {'$eq' : ['$status','4']},'then' : "bounced"},
{'case' : {'$eq' : ['$status','5']},'then' : "unsubscribed"},
{'case' : {'$eq' : ['$status','6']},'then' : "complained"}
]
}
}
}},
]);
Thanks !!!
You can use Regexp. Something like:
"status": open/

Missing Containers Cmdlet

I created the new Server Core (Windows 2016). I can't find the all container cmdlet in powershell. I did Uninstall/installed the containers feature but still missing all cmdlet. How do i get containers cmdlet in powershell?
Here is my server info.
WindowsBuildLabEx : 16299.15.amd64fre.rs3_release.170928-1534
WindowsCurrentVersion : 6.3
WindowsEditionId : ServerDatacenterACor
WindowsInstallationType : Server Core
WindowsInstallDateFromRegistry : 28/4/2018 12:41:19 PM
WindowsProductId : 00395-60000-00001-AA842
WindowsProductName : Windows Server Datacenter
WindowsRegisteredOrganization :
WindowsRegisteredOwner : Windows User
WindowsSystemRoot : C:\Windows
WindowsVersion : 1709
BiosCharacteristics : {3, 9, 15, 16...}
BiosBIOSVersion : {VRTUAL - 1, Hyper-V UEFI Release v2.5, Microsoft - 100032}
BiosBuildNumber :
BiosCaption : Hyper-V UEFI Release v2.5
BiosCodeSet :
BiosCurrentLanguage :
BiosDescription : Hyper-V UEFI Release v2.5
BiosEmbeddedControllerMajorVersion : 255
BiosEmbeddedControllerMinorVersion : 255
BiosFirmwareType : Uefi
BiosIdentificationCode :
BiosInstallableLanguages :
BiosInstallDate :
BiosLanguageEdition :
BiosListOfLanguages :
BiosManufacturer : Microsoft Corporation
BiosName : Hyper-V UEFI Release v2.5
BiosOtherTargetOS :
BiosPrimaryBIOS : True
BiosReleaseDate : 22/8/2017 8:00:00 AM
BiosSeralNumber : 8355-6248-8581-2148-3845-5374-58
BiosSMBIOSBIOSVersion : Hyper-V UEFI Release v2.5
BiosSMBIOSMajorVersion : 2
BiosSMBIOSMinorVersion : 4
BiosSMBIOSPresent : True
BiosSoftwareElementState : Running
BiosStatus : OK
BiosSystemBiosMajorVersion : 2
BiosSystemBiosMinorVersion : 5
BiosTargetOperatingSystem : 0
BiosVersion : VRTUAL - 1
CsAdminPasswordStatus : Unknown
CsAutomaticManagedPagefile : True
CsAutomaticResetBootOption : True
CsAutomaticResetCapability : True
CsBootOptionOnLimit :
CsBootOptionOnWatchDog :
CsBootROMSupported : True
CsBootStatus : {0, 0, 0, 127...}
CsBootupState : Normal boot
CsCaption : WIN16DCORE
CsChassisBootupState : Safe
CsChassisSKUNumber :
CsCurrentTimeZone : 480
CsDaylightInEffect :
CsDescription : AT/AT COMPATIBLE
CsDNSHostName : WIN16DCore
CsDomain : WORKGROUP
CsDomainRole : StandaloneServer
CsEnableDaylightSavingsTime : True
CsFrontPanelResetStatus : Unknown
CsHypervisorPresent : True
CsInfraredSupported : False
CsInitialLoadInfo :
CsInstallDate :
CsKeyboardPasswordStatus : Unknown
CsLastLoadInfo :
CsManufacturer : Microsoft Corporation
CsModel : Virtual Machine
CsName : WIN16DCORE
CsNetworkAdapters : {vEthernet - 1}
CsNetworkServerModeEnabled : True
CsNumberOfLogicalProcessors : 1
CsNumberOfProcessors : 1
CsProcessors : {Intel(R) Core(TM) i3-2100 CPU # 3.10GHz}
CsOEMStringArray : {[MS_VM_CERT/SHA1/9b80ca0d5dd061ec9da4e494f4c3fd1196270c22],
00000000000000000000000000000000, To be filled by OEM}
CsPartOfDomain : False
CsPauseAfterReset : -1
CsPCSystemType : Desktop
CsPCSystemTypeEx : Desktop
CsPowerManagementCapabilities :
CsPowerManagementSupported :
CsPowerOnPasswordStatus : Unknown
CsPowerState : Unknown
CsPowerSupplyState : Safe
CsPrimaryOwnerContact :
CsPrimaryOwnerName : Windows User
CsResetCapability : Other
CsResetCount : -1
CsResetLimit : -1
CsRoles : {LM_Workstation, LM_Server, NT, Server_NT}
CsStatus : OK
CsSupportContactDescription :
CsSystemFamily : Virtual Machine
CsSystemSKUNumber : None
CsSystemType : x64-based PC
CsThermalState : Safe
CsTotalPhysicalMemory : 5082476544
CsPhyicallyInstalledMemory : 4964352
CsUserName :
CsWakeUpType : PowerSwitch
CsWorkgroup : WORKGROUP
OsName : Microsoft Windows Server Datacenter
OsType : WINNT
OsOperatingSystemSKU : 145
OsVersion : 10.0.16299
OsCSDVersion :
OsBuildNumber : 16299
OsHotFixes : {KB4099989, KB4093112}
OsBootDevice : \Device\HarddiskVolume2
OsSystemDevice : \Device\HarddiskVolume4
OsSystemDirectory : C:\Windows\system32
OsSystemDrive : C:
OsWindowsDirectory : C:\Windows
OsCountryCode : 65
OsCurrentTimeZone : 480
OsLocaleID : 4809
OsLocale : en-SG
OsLocalDateTime : 29/4/2018 1:35:42 PM
OsLastBootUpTime : 29/4/2018 1:23:23 PM
OsUptime : 00:12:18.3221697
OsBuildType : Multiprocessor Free
OsCodeSet : 1252
OsDataExecutionPreventionAvailable : True
OsDataExecutionPrevention32BitApplications : True
OsDataExecutionPreventionDrivers : True
OsDataExecutionPreventionSupportPolicy : OptOut
OsDebug : False
OsDistributed : False
OsEncryptionLevel : 256
OsForegroundApplicationBoost : Maximum
OsTotalVisibleMemorySize : 4963356
OsFreePhysicalMemory : 4239756
OsTotalVirtualMemorySize : 6536220
OsFreeVirtualMemory : 5858416
OsInUseVirtualMemory : 677804
OsTotalSwapSpaceSize :
OsSizeStoredInPagingFiles : 1572864
OsFreeSpaceInPagingFiles : 1572864
OsPagingFiles : {C:\pagefile.sys}
OsHardwareAbstractionLayer : 10.0.16299.371
OsInstallDate : 28/4/2018 8:41:19 PM
OsManufacturer : Microsoft Corporation
OsMaxNumberOfProcesses : 4294967295
OsMaxProcessMemorySize : 137438953344
OsMuiLanguages : {en-US}
OsNumberOfLicensedUsers : 0
OsNumberOfProcesses : 66
OsNumberOfUsers : 2
OsOrganization :
OsArchitecture : 64-bit
OsLanguage : en-US
OsProductSuites : {TerminalServices, TerminalServicesSingleSession}
OsOtherTypeDescription :
OsPAEEnabled :
OsPortableOperatingSystem : False
OsPrimary : True
OsProductType : Server
OsRegisteredUser : Windows User
OsSerialNumber : 00395-60000-00001-AA842
OsServicePackMajorVersion : 0
OsServicePackMinorVersion : 0
OsStatus : OK
OsSuites : {TerminalServices, TerminalServicesSingleSession}
OsServerLevel : ServerCore
KeyboardLayout : en-US
TimeZone : (UTC+08:00) Kuala Lumpur, Singapore
LogonServer :
PowerPlatformRole : Desktop
HyperVisorPresent : True
HyperVRequirementDataExecutionPreventionAvailable :
HyperVRequirementSecondLevelAddressTranslation :
HyperVRequirementVirtualizationFirmwareEnabled :
HyperVRequirementVMMonitorModeExtensions :
DeviceGuardSmartStatus : Off
DeviceGuardRequiredSecurityProperties :
DeviceGuardAvailableSecurityProperties :
DeviceGuardSecurityServicesConfigured :
DeviceGuardSecurityServicesRunning :
DeviceGuardCodeIntegrityPolicyEnforcementStatus :
DeviceGuardUserModeCodeIntegrityPolicyEnforcementStatus :
Here is cmdlet to find the container cmdlet and result
Get-WindowsFeature -Name Containers
Display Name Name Install State
------------ ---- -------------
[X] Containers Containers Installed
Get-InstalledModule
Version Name Repository Description
------- ---- ---------- -----------
1.0.0.4 DockerMsftProvider PSGallery PowerShell module with commands for discovering,...
1.0.154 DockerPowershell PSGallery Adds cmdlets to work with the Docker cli.
get-command | where Source -EQ "*cont*"
Empty

How to find something from an array in mongo

{
"_id" : ObjectId("586aac4c8231ee0b98458045"),
"store_code" : NumberInt(10800),
"counter_name" : "R.N.Electric",
"address" : "314 khatipura road",
"locality" : "Khatipura Road (Jhotwara)",
"pincode" : NumberInt(302012),
"town" : "JAIPUR",
"gtm_city" : "JAIPUR",
"sales_office" : "URAJ",
"owner_name" : "Rajeev",
"owner_mobile" : "9828024073",
"division_mapping" : [//this contains only 1 element in every doc
{
"dvcode" : "cfc",
"dc" : "trade",
"beatcode" : "govindpura",
"fos" : {
"_id" : ObjectId("586ab8318231ee0b98458843"),
"loginid" : "9928483483",
"name" : "Arpit Gupta",
"division" : [
"cfc",
"iron"
],
"sales_office" : "URAJ", //office
"gtm_city" : "JAIPUR" //city
},
"beat" : {
"_id" : ObjectId("586d372b39f64316b9c3cbd7"),
"division" : {
"_id" : ObjectId("5869f8b639f6430fe4edee2a"),
"clientdvcode" : NumberInt(40),
"code" : "cfc",
"name" : "Cooking & Fabric Care",
"project_code" : "usha-fos",
"client_code" : "usha",
"agent_code" : "v5global"
},
"beatcode" : "govindpura",
"sales_office" : "URAJ",
"gtm_city" : "JAIPUR",
"active" : true,
"agency_code" : "v5global",
"client_code" : "USHA_FOS",
"proj_code" : "usha-fos",
"fos" : {
"_id" : ObjectId("586ab8318231ee0b98458843"),
"loginid" : "9928483483",
"name" : "Arpit Gupta",
"division" : [
"cfc",
"iron"
],
"sales_office" : "URAJ",
"gtm_city" : "JAIPUR"
}
}
}
],
"distributor_mail" : "sunil.todi#yahoo.in",
"project_code" : "usha-fos",
"client_code" : "usha",
"agent_code" : "v5global",
"distributor_name" : "Sundeep Electrical"
}
I am having only 1 element in division_mapping's array and I want to find those documents whose dc in division_mapping is trade.
I have tried following:
"division_mapping":{$elemMatch:{$eq:{"dc":"trade"}}}})
Dont know what I am doing wrong.
//Maybe I have to unwind the array but is there any other way?
According to MongoDB documentation
The $elemMatch operator matches documents that contain an array
field with at least one element that matches all the specified query
criteria.
According to above mentioned description to retrieve only documents whose dc in division_mapping is trade please try executing below mentioned query
db.collection.find({division_mapping:{$elemMatch:{dc:'trade'}}})

How to loop and insert data into different tables from JSON

I have a JSON and I need to write the values into different tables. I could get the data from json, but I need to insert the data accordingly. It's like I have a form, the form has n number of sections, each section have n number of steps and each step can have n number of questions. How I can loop this and write into different tables? Basically I need to know how we can find how many sections, steps and questions we have in the JSON. I tried array_length, but not working.
Here is a small sample of my JSON.
{ "functionId" : "2","subFunctionId" : "6","groupId" : "11","formId" : "","formName":"BladeInseption","submittedBy" : "200021669","createdDate" : "2015-08-06",
"updatedBy" : "","updatedDate" : "","comments" : "","formStatusId" :"11","formStatus" :"Draft","formLanguage" : "English","isFormConfigured" : "N","formChange":"Yes",
"sectionLevelChange":"Yes","isActive" : "Y","formVersionNo" : "1.0","formFooterDetails" : "","formHeaderDetails" : "","images" : [
{"imageId" : "","imageTempId" : "","imageTempUrl" : "","imageName" : "","imageUrl" : "","isDeleted" : "","imagesDesc" : ""} ],
"imagesDescLevel" : "","sectionElements" : [{"sectionElement":[{"sectionId" : "","sectionTempId":"sectionId+DDMMHHSSSS","sectionName":"section1",
"sectionChange":"Yes","stepLevelChange":"Yes","sectionLabel" : "","sectionOrder" : "1","outOfScopeSection" : "false",
"punchListSection" : "false","images" : [{"imageId" : "","imageTempId" : "","imageTempUrl" : "","imageName" : "","imageUrl" : "","isDeleted" : "",
"imagesDesc" : ""}],"imagesDescLevel" : "","isDeleted" : "","stepElements" : [{"stepElement":[{"stepId" : "","stepTempId":"stepId+DDMMHHSSSS",
"stepName":"section1step1","stepLabel" : "","stepOrder" : "1","stepChange":"Yes","questionLevelChange":"Yes","images" : [{"imageId" : "",
"imageTempId" : "","imageTempUrl" : "","imageName" : "","imageUrl" : "","isDeleted" : "","imagesDesc" : ""}],"imagesDescLevel" : "","isDeleted" : "",
"questionAnswerElements" : [{"questionAnswerElement":[{"questionId" : "","questionClientUid" : "","questionDescription" : "step1question1",
"questionAccessibility" : "","isPunchListQuestion" : "","questionChange":"Yes","questionOrder" : "1","isDeleted" : "","images" : [{
"imageId" : "","imageTempId" : "","imageTempUrl" : "","imageName" : "","imageUrl" : "","isDeleted" : "","imagesDesc" : ""}],"imagesDescLevel" : "",
"answerId" : "","answerClientUid" : "","elements" :[{"element" :[{"elementId": "2","elementMapId" : "12","clientUid" : "","clientClass" : "","imageTempId" : "",
"imageTempUrl" : "","elementType":"Question","elementOrder" : "1","elementArributuesProp": [{"attributeId" : "1","attributeName" : "","defaultValue" : ""}],
"elementArributuesVal":[{"value1" : "item1"}],"rule" : [{"ruleId" : "1","ruleName" : "Mandatory","formula" : "i>a","formulaData" : "i>50","isDeleted" : "",
...
}
If you know all paths to JSON arrays in your code, can use some special functions appearing in 9.4 such as
SELECT json_array_length('{"array":[{"a":1},{"b":2},{"c":3}]}'::json->'array')
If you need to iterate through JSON array, there is another useful function:
SELECT json_array_elements('{"array":[{"a":1},{"b":2},{"c":3}]}'::json->'array')
SELECT json_array_elements('[{"a":1},{"b":2},{"c":3}]'::json)
or if json is stored in table, lets call
SELECT json_array_elements(tbl.json_value->'array') FROM jsontable AS tbl
It returns a set of json values unwrapped from array ready to processing.
http://www.postgresql.org/docs/9.4/static/functions-json.html
More information about JSON parsing can be found here
How do I query using fields inside the new PostgreSQL JSON datatype?

Select entries which doesn't have specified key

Assume, that I have bunch of entries in a document:
db.document
and some of them doesn't have some key, let's say name. So we have two types of entries - with and without name.
{ "_id" : ObjectId("4dea81a8bd2bb0323800002d"), "fetched_at" : ISODate("2013-08-02T17:41:30Z"), "keyword" : "110770", "name" : "SOME NAME" }
{ "_id" : ObjectId("4dea81a8bd2bb0323800002a"), "fetched_at" : ISODate("2013-08-02T17:44:17Z"), "keyword" : "125176" }
I want to remove all entries without name property, because it makes my database incosistent. How can I do that? I tried with null and undefined but it doesn't works.
it's possible using $exists:
db.document.remove( { name : { $exists : false } } );
db.document.remove( { name : null } )
should work too. Example:
> db.document.insert({"fetched_at" : ISODate("2013-08-02T17:41:30Z"), "keyword" : "110770", "name" : "SOME NAME"})
> db.document.insert({"fetched_at" : ISODate("2013-08-02T17:44:17Z"), "keyword" : "125176" })
> db.document.insert({"fetched_at" : ISODate("2013-08-02T17:44:17Z"), "keyword" : "125176" })
> db.document.find().size()
3
> db.document.remove({name:null})
> db.document.find().size()
1
> db.document.find().pretty()
{
"_id" : ObjectId("520eac7e5d0ee1aa8515a550"),
"fetched_at" : ISODate("2013-08-02T17:41:30Z"),
"keyword" : "110770",
"name" : "SOME NAME"
}