We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bdd9c4 commit d0518f1Copy full SHA for d0518f1
Leanplum-SDK/Classes/Leanplum.m
@@ -3523,7 +3523,17 @@ - (NSDictionary *)dictionaryNamed:(NSString *)name
3523
[Leanplum throwError:@"[LPActionContext dictionaryNamed:] Empty name parameter provided."];
3524
return nil;
3525
}
3526
- return (NSDictionary *) [self objectNamed:name];
+ LP_TRY
3527
+ id object = [self objectNamed:name];
3528
+ if ([object isKindOfClass:[NSDictionary class]]) {
3529
+ return (NSDictionary *) object;
3530
+ }
3531
+
3532
+ if ([object isKindOfClass:[NSString class]]) {
3533
+ return [LPJSON JSONFromString:object];
3534
3535
+ LP_END_TRY
3536
+ return nil;
3537
3538
3539
- (NSArray *)arrayNamed:(NSString *)name
0 commit comments