195
rated 0 times
[
200]
[
5]
/ answers: 1 / hits: 10996
/ 11 Years ago, tue, december 10, 2013, 12:00:00
I am trying to get all the keys and values of an object that begin with imageIds
.
My object appears as the following:
{
title: 'fsdfsd',
titleZh: 'fsdfsd',
body: 'fsdf',
bodyZh: 'sdfsdf',
imageIds: '/uploads/tmp/image-3.png',
imageIdsZh: ''
}
but I only need the properties imageIds
, and imageIdsZh
. However tomorrow, a object might contain imageIdsBlah
and I would need to pick it up as well. I could remove the first few properties from the object, but then the next object might contain additional properties such as foo: 'bar'
More From » javascript