-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indexed arrays don't appear to work #2
Comments
Just doing a bit more fiddling, and it seems that referencing a dictionary by index seems to work. This means I can sort of support what I want by mapping my array input into a dictionary input: let input = [ "list" : [ "0":"aaa", "1":"bbb" ] ] let template = Template(string: "{{list.0}}")! println(template.render(Box(input))!) Not quite as pretty, but manageable I guess. |
Hi @edwardaux.
You can use |
I dislike a lot the non-standard syntax |
Thanks for the quick reply @groue Now that you mention it, my googling to find the While Thanks again |
I'm happy you could find a workaround. Happy Mustache! |
@edwardaux FYI there is no Swift1.2 branch any longer: the master branch itself has switched to Swift1.2. |
Thanks for the pointer. Updating now. |
Cool. Were you able to have Carthage working? I've tried and failed so far. |
Yep, working for me - note, though, I was building a Mac OS X app (not iOS) using Xcode 6.3beta4 pointing to I have downloaded Xcode 6.3 GA, but haven't had a chance to repoint to What problems are you having? |
I don't exactly remember now - it was a few weeks ago. It would get in a complete muddle in the middle of the two targets, the one for iOS and the one for OSX. But if you could do it, I could do it as well. I'll just try again. Thanks for telling me you did it, that's a light of hope :-) |
Hi... I'm using the Swift1.2 branch, and am having trouble referencing array values via a direct index. eg.
{{list.0}}
. The following just outputs an empty string:Interestingly, however, if I use
{{list}}
, then it outputsaaabbb
. Just curious if fetching data from arrays using an index is supported?Of course, it could also be that (as a Mustache newbie) I am using the wrong notation.
Thanks.
The text was updated successfully, but these errors were encountered: