Hi,
Lets say I have following primary data set.
{
"type": "Topology",
"objects": {
"countries": {
"type": "GeometryCollection",
"bbox": [-179.99999999999997, -90.00000000000003, 180.00000000000014, 83.64513000000001],
"geometries": [{
"type": "Polygon",
"countryCode": "AFG",
"id": "afghanistan",
"arcs": [
[0, 1, 2, 3, 4, 5]
]
}, {
"type": "Polygon",
"countryCode": "EGY",
"id": "egypt",
"arcs": [
[247, 248, 249, 250, 251]
]
}
}
}
}
Following is my secondary data set.
["afghanistan",4.23],["EGY",1.23]
And my lookup function is below.
{
"type": "lookup",
"keys": ["id","countryCode"],
"on": config.title,
"onKey": metadata.names[config.x],//here correct attribute is given. So for above case this value will be either "afghanistan" or "EGY"
"as": ["zipped"],
"default": {"v": null, "country":"No data"}
}
As per the documentation says "Lookup accepts one or more key values for the primary data set, each of which are then searched for within a single key field of the secondary data set. If a match is found, the full data object in the secondary data set is added as a property of the primary data set." But it only works if I put on id for keys attribute in above lookup function. I believe it should check the countryCode also for a match. Is this a bug ? Did I miss anything here.